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

Re: [css3] [css21] browser specific CSS

From: Alan Gresley <alan@css-class.com>
Date: Thu, 21 Apr 2011 18:12:01 +1000
Message-ID: <4DAFE6D1.60006@css-class.com>
To: Glenn Linderman <v+html@g.nevcal.com>
CC: www-style@w3.org
On 21/04/2011 3:44 PM, Glenn Linderman wrote:
> On 4/20/2011 10:01 PM, Boris Zbarsky wrote:
>> On 4/21/11 12:39 AM, Glenn Linderman wrote:
>>> 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.
>>
>> Yes, that is exactly what happens.
>
> Thanks for sticking with me until I understand it.
>
> Produces pretty sad results. Chrome does the same, apparently. Opera and
> IE do better. Dunno about the rest. Alan demonstrated what appears to be
> a hack depending on current but non-standard behavior that improves the
> results.

Please don't see it as a hack. If you had declared a width value on the 
floated element with overflow, then you would not need to give extra 
magical CSS to fix something that is way to esoteric in the first place. 
I simple declared width makes an authors job easier, one demo [1] (BTW, 
it's an experiment, not grounds to say that there are bugs).


> Helpful until something changes. This is why we web authors
> need to do browser brand and version sniffing, because to get pleasing
> results, we have to go into areas that are not standardized.


You should say what is not interoperable (consistent across browserland).


> In _this_
> case, code can be written that happens to work similarly enough in 5
> browsers (per Alan, I don't have Safari installed here), that it seems
> that brand and version sniffing is not necessary for current browser
> versions... but I don't know if that picture changes if more browser
> brands are tested, and as soon as one of them changes something in their
> non-standard-prescribed behavior, such may be necessary, or a wholesale
> rewrite of the CSS for this case.


Is this about auto width floats with overflow or are you applying this 
generally about CSS? You don't need to browser sniff to code CSS and 
have it look the same in all browser (the exception is IE depending on 
mode).


> Having a simple CSS way to sniff
> browser brands and versions would make me feel a lot more comfortable
> with using Alan's hack.
>
> And, of course, none of this addresses keeping the headers and footers
> visible while scrolling.


This really has nothing to do with tables. I have showed you the fix, 
which is here.

http://css-class.com/test/css/overflow/table-inside-auto-width-float-overflow.htm


The problem is the use of auto width floats with overflow. There is no 
interoperability among browsers when you use this potent mixture.

http://css-class.com/test/css/overflow/block-inside-auto-width-float-overflow.htm


Instead of hacking, just don't use auto width floats with overflow.



[1] http://css-class.com/test/demos/xml/baptism-xhtml.htm


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Thursday, 21 April 2011 08:12:29 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT