Full percentage values can break your layout

Imagine you have two columns and are going to stretch the columns to fill the browser’s window. Simply assigning 50% width to each column wouldn’t stretch the columns perfectly to fill the browser’s window because the sum of 50% + 50% is not always 100% in all browsers. In fact the actual value can be 101% and it causes layout to break in those browsers.

Here is how IE6 renders those columns:IE6 rendering

To avoid this problem in IE and other browsers, simply assign 49% and 50% width to each column so they will be displayed correctly in all browsers:

firefox rendering

15 Comments

  1. great post, very informative. I wonder why the other specialists of this sector don’t notice this. You should continue your writing. I am sure, you’ve a great readers’ base already!

    Reply
  2. Hi, Neat post. There’s a problem along with your website in internet explorer, might test this… IE still is the market leader and a big element of people will pass over your excellent writing due to this problem.

    Reply
  3. This is very interesting, You’re a very skilled blogger. I have joined your feed and look forward to seeking more of your fantastic post. Also, I’ve shared your web site in my social networks!

    Reply
  4. Heya i’m for the first time here. I came across this board and I find It truly useful & it helped me out much. I hope to give something back and help others like you aided me.

    Reply
  5. Good post. I be taught something tougher on different blogs everyday. It can all the time be stimulating to read content material from other writers and practice a bit of one thing from their store. I’d prefer to make use of some with the content on my blog whether you don’t mind. Natually I’ll give you a hyperlink in your web blog. Thanks for sharing.

    Reply
  6. Thank you a bunch for sharing this with all people you really
    recognize what you are talking approximately! Bookmarked.
    Kindly additionally discuss with my web site =.
    We will have a link alternate contract among us!

    Reply
  7. Ι ωаs reсоmmended this
    blog by mеаns of mу cousin.
    I’m not positive whether or not this submit is written by him as no one else recognize such certain approximately my trouble. You’re amazing!
    Τhаnk you!

    Reply
  8. Heyа i’m for the first time here. I found this board and I find It truly useful & it helped me out much. I’m hoping to giνе something again аnd help
    otherѕ lіke you aideԁ me.

    Reply

Leave a Reply