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 174457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:31:32+00:00 2026-05-11T13:31:32+00:00

In this web site when you shrink the browser window the white space on

  • 0

In this web site when you shrink the browser window the white space on the left and right disappear first, following by the shrinking of the right panel, followed by the main container panel. I have recently started to use ASP.NET MVC and in my test case my containers drop below the other containers as I resize the browser window. I am using a a site.master page with a left, center and right section as part of the body. It there an attribute in css that dictates the behavior or an HTML element? I have viewed the page source of this site’s main page and looked at the CSS but nothing obvious has jumped out at me as how this is being controlled.

  • 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. 2026-05-11T13:31:33+00:00Added an answer on May 11, 2026 at 1:31 pm

    One of the great things about web development is that most often, when you see a site and think ‘How did they do that’, it’s very easy to look at the code and find out, and also to test it out – tools like Firebug for Firefox, the Developer Tools in IE 8 (F12) and Chrome will all display nicely formatted source and CSS, and will let you modify it in situ.

    In the case of SO, the main body of the site is contained in a div with class of ‘container’, the style rules for ‘container’ are:

    .container {   margin: 0 auto;   text-align: left;   width: 950px; } 

    The key thing we’re looking at here is that this class has a fixed width – 950 pixels, and the margins are set to (expanded):

    margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; 

    Setting the left and right margins to ‘auto’ has the affect of centering the div within the edges of it’s container, and allowing them to expand to whatever width is needed once the container has taken up the required 950px.

    Inside the container div, you then have a div with id ‘content’ (no style rules), and then two divs: ‘mainbar’ and ‘sidebar’ whose styles are:

    #mainbar {   float: left;   margin-bottom: 40px;   width: 715px; }  #sidebar {   float: right;   width: 220px; /* this is also set in the 'style' attribute * } 

    These left and right floats are what’s positioning the bars in the right places.

    Another handy CSS rule is:

    clear 

    this can be set to ‘both’, ‘left’ or ‘right’, and will basically reset the floats on the containers.

    However, it sounds like you’re after what is often called the ‘Holy Grail of CSS‘ (Rick points out that there’s a bug in this with IE7, see here for a fix) for good reason: Three Columns, with at least one of them flexible.

    Other examples, of completely flexible layouts include:

    • Multi-column layouts climb out of the box
    • Fluid grids
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this web site (photoblog) http://www.OneReaction.net/ and I am very curious how this
I have a web site in asp.net that uses a master page. In this
I'm trying to use System.DirectoryServices in a web site project and I'm getting this
I'm taking over a development of a commercial web site. This site was developed
This article states that If your site is run on a shared Web server,
I searched all over this site and the web for a good and simple
Just came across this website . Feature 9 is memory management and they claim
The people on this website seem to know everything so I figured I would
So I have this website that will be accessed via an SSL connection (
According to this website , you can change to command key sequence used by

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.