Re: [RC6] c5510-padn-000 has a fractional pixel issue

On Wed, 25 Jan 2012 17:13:35 +0100, Chris Lilley <chris@w3.org> wrote:

> On Tuesday, January 24, 2012, 5:28:54 AM, Gérard wrote:
>
> GT> 138px mult by 0.17391 == 23.99958px
> GT> but both Chrome 16.0.912.77, Konqueror 4.7.4 and Opera 11.60 will
> GT> unexpectedly truncate that value to 23px!
>
> Why on earth do they truncate rather than round? Is there some  
> spec-conformance issue that makes them do this (apparently dumb)  
> behaviour?

I don't know if this is the real reason, but it's one possible  
disadvantage to rounding to nearest:

#col1, #col3 { float: left; width: 15%; }
#col2 { float: left; width: 70%; }

<div id="wrapper">
<div id="col1">...</div>
<div id="col2">...</div>
<div id="col3">...</div>
</div>

15% + 70% + 15% = 100%, so these would be expected to fit nicely beside  
each other. But suppose the window size happens to put #wrapper at, say,  
791px. 791*0.7 = 553.7, 791*0.15 = 118.65, and 554 + 119*2 = 792. So #col3  
will end up being pushed down below the rest. 1px empty space looks less  
bad in comparison.

-- 
Øyvind Stenhaug
Core Norway, Opera Software ASA

Received on Wednesday, 25 January 2012 17:15:30 UTC