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

  • Home
  • SEARCH
  • 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 3791098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:25:03+00:00 2026-05-19T12:25:03+00:00

I have a 2 column layout, which structured something like this: html structure: #container

  • 0

I have a 2 column layout, which structured something like this:

html structure:

#container
  #content
  #side-a
  .janitor

css:

#container{ width: 501px; }
#content { 
  float: left; 
  width: 300px;  
  border-right: 1px solid black;
}
#side-a{
  float: right;
  width: 200px;
}
.janitor {clear: both; }

When there is no border everything is fine, but when I add it, layout collapses on zooming out.

  • 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-19T12:25:04+00:00Added an answer on May 19, 2026 at 12:25 pm

    That’s because the border width is added to the content width you specified.

    #content is 300px, #side-a is 200px – that’s 500px altogether. #container is 501px. Without border’s, you’ve 1px still left, BUT…

    Adding a border, even 1px, makes #content 300px + 2px wide, #side-a 200px + 2px wide. I’m surprised it doesn’t collapse when zoomed in.

    You can fix this by using:

    box-sizing: border-box;
    

    (with appropriate vendor prefixes).

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

Sidebar

Related Questions

I have a layout which works fine. This layout contains several partials, which display
I have a menu made with HTML, using a simple UL with lots of
I have the following ExtJS Panel embedded in another Panel, which then resides in
We have a JPanel which contains multiple JPanels which contain JComponents (let's say JLabels
I have some page layouts that require multiple columns and all of their content
I have the following calls in one of my classes @Override public Integer save(NewsItem
I have a horizontal StackPanel with an image and another StackPanel. The inner StackPanel
I am trying to scroll a listview control in WPF which is embedded in
is it possible to populate a listview based on a row Id from a
Is it possible to completely emulate the behavior of a GridLayout with the GridBagLayout

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.