Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7619179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:37:05+00:00 2026-05-31T03:37:05+00:00

Basically the container is to have a width of 100% (i.e. it will fill

  • 0

Basically the container is to have a width of 100% (i.e. it will fill the whole of the page) and it will have two columns:

  • column 1 is the nav bar and should remain a fixed width, e.g. 200px
  • column 2 is the content area and should have no specific width – it should just fill the remaining area and adjust according to screen/window sizes

What is the best way to accomplish this?

XHTML:

<body>
    <div id="container">
        <div id="navbar">
          &nbsp;
        </div>

        <div id="content">
          &nbsp;
        </div>
    </div>
</body>

CSS:

#container { float: left; width: 100%; }
#navbar { float: left; width: 200px; height: 800px; }
#content { float: left; height: 800px; ??? }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:37:06+00:00Added an answer on May 31, 2026 at 3:37 am

    The way I would do it is to set a minimum width on the container and content divs, with a left margin on the content div that allows it to slide next to the nav div. The left margin plus the minimum width should equal the minimum width of the container. I’ve added border so you can see that it sizes correctly.

    #container
    {
        width: 100%;
        min-width: 960px;
    }
    
    #nav
    {
        float: left;
        width: 200px;
        height: 100%;
        min-height: 800px;
        border: 1px solid #ff0000;
    }
    
    #content
    {
        margin-left: 205px;
        min-width: 755px;
        height: 100%;
        min-height: 800px;
        border: 1px solid #0000ff;
    }
    

    Fiddle at http://jsfiddle.net/bmMTW/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that is basically this: <div id=thelist style=height:100%; width:100%></div> <script type=text/javascript>
Basically I'm creating this website and I have the wrapper set to 100% width
I have a DLPUser object in my session, this DLPUser is basically a container
Basically, I have a main container div with nested content. This div is has
Let's assume that I have two tables... Foo and Bar. They contain the following
I have a need for a model(?) on my app which basically contains a
I have ModalPopupExtender that contains a UserControl that basically consists of a GridView and
I basically have three tables, posts, images and postimages (this simply contains the ids
Ok so basically I need to check,whether in my menu #Container exist any third
I'm trying to write my first iterator class / container type. Basically, I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.