I’m having a problem with percentage based layout. Here is my code http://jsfiddle.net/uHkXH/
If your are using Safari or Opera on Mac, or IE7 on Windows, or iPhone iPad you will see a gap on the right side. But the width, padding and margin of four boxes should be 100% in total. I cannot understand why there is still a gap.
Does anyone can explain this problem and help me to solve it? Thank you very much indeed!
Its a problem with certain browsers trying to round subpixel (decimal) widths. The percentages are converted to pixels automatically.
If you go through and add up the calculated width in pixels of the elements in your jsfiddle they don’t add up to the width of your container element.
Here is some more info
http://css-tricks.com/percentage-bugs-in-webkit/
and
How do I get around the IE CSS percentage rounding problem?
and