I discovered this problem because I it's a nasty bug in Opera. When testing out I found an inconsistency in webkit to. Check the following example: <div style="width: 1000px; background: #CCC"> <div style="background: #00f; width: 509px;"> </div> <div style="background: #00f; width: 50.9%;"> </div> </div> I believe that the second inner div should also display as 509px wide. The link attached also shows the bug. Link is not mine, but made to illustrate opera-problem, so let's hope it stays up for you to see.
I forgot to mention that webkit renders the second div as 508px wide. 50.9% of 1000px = 509px, but webkit manages to round (that whole number?) down to 508px.
Should probably add the 'within 0.01' check from the css back end to the length front end when doing percents.
(In reply to comment #2) > Should probably add the 'within 0.01' check from the css back end to the length front end when doing percents. I can confirm this, and have observed this discrepancy in width calculation in Safari, and previously Presto, for every percentage based framework grids I see. Including my own preliminary model at: http://www.hexanet.com/test/ In Safari 5,5 .1, and 6 on this grid, both the inline-block and block rows do not fill the 100% of the given container, while they do correctly in Chrome, Blink and IE. It get worse when you resize the viewport. My question would be why does Safari round up to the second decimal and not Chrome? As you seem to suggest...
Created attachment 207167 [details] Duplicate
I manage to get the test using Wayback Archive and 2008 copy: Link - http://web.archive.org/web/20080516092110/http://www.brunildo.org/test/percwidth2.pl It seems to render same in WebKit ToT, Chrome Canary 113 and Firefox Nightly 113. Do we have to track it or if someone can confirm, whether we have this issue or not?
<div style="width: 1000px; background: #CCC"> <div style="background: #00f; width: 509px;"> </div> <div style="background: #00f; width: 50.9%;"> </div> </div> works fine now.