W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: [css3] [css21] browser specific CSS

From: Glenn Linderman <v+html@g.nevcal.com>
Date: Wed, 20 Apr 2011 21:39:33 -0700
Message-ID: <4DAFB505.8000902@g.nevcal.com>
To: www-style@w3.org
On 4/20/2011 7:15 PM, Boris Zbarsky wrote:
> On 4/20/11 5:23 PM, Glenn Linderman wrote:
>> Yes, that would be a smaller container width... but the data would have
>> the same space
> At least in Gecko's case that's not true.  For overflow:auto the way 
> things work is that you lay out at the container width, and then if 
> the height is too big you add the vertical scrollbar and lay out at 
> (width of container - width of scrollbar).
> So the table actually has different amounts of available space 
> depending on whether the container's width calculation assumes there 
> will or won't be a scrollbar.

I see!  So that explains why the sample I sent looks the way it does... 
the intrinsic width is calculated, the container is set to that size, 
the height is too big, and so the scrollbar is added, which subtracts 
from the space available for the content, so it gets even taller, and 
multiple lines are used per cell even though there is plenty of blank 
space to the right.

>> What solution is used when this case arises?  The "obvious easy"
>> solution would be to leave room for the scrollbars, but don't display
>> them if they aren't actually needed...
> This is pretty easy to do, and looks like crap. 

Sure, but only in the unstable case, which wouldn't happen very often.  
And so does the above, per my link at http://nevcal.com/test/testtab3.html

> Which is why browsers don't do that for overflow:auto....
> -Boris
Received on Thursday, 21 April 2011 04:40:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC