I’ve had a strange issue with a header for a mobile site with the following code:
padding: 10px 5% 10px 5%;
width: 90%;
You can see the effect here -> http://cssdesk.com/vEMCY
The div with this code in is fractionally shorter than a div with no padding an a width of 100%.
I’ve got around it by putting margin’s round the elements in the header and taking padding off and setting the width to 100% but I’m curious as to why it’s done this as last I checked 5 + 5 + 90 = 100.
Webkit-based browsers have a rounding bug with percentage measurements.
A little while back, I had asked a very similar question and that seemed to be the issue. Refer to: Chrome and it's handling of %s
The post detailing the problem can be found here (originally shared by bookcasey).