On Nov 8, 2010, at 9:31 PM, Alan Gresley wrote:

> Philippe Wittenbergh wrote:

>> zoom triggers haslayout; without it, you inline element wouldn't take a 
>> 'width' (width would only trigger haslayout, but would otherwise be ignored, 
>> that is the inline element would remain at its intrinsic width - I know this 
>> sounds crazy, we're talking IE here).
> 
> Very interesting. While researching I stumbled onto one of Bruno's test pages 
> regarding inline-block and hasLayout.
> 
> <http://www.brunildo.org/test/InlineBlockLayout.html>
> 
> Lower down staring me in the face was another solution that has been called 
> the "trip switch hasLayout trigger".
> 
> li { display: inline-block; width:100px;}
> *+html li { display: inline;} /* IE7 */
> * html li { display: inline;} /* IE6 */

Yeah, I'm aware of that page, and it _should_ always work - display: 
inline-block sets the 'hasLayout' flag, and that flag is not / cannot be reset 
by the subsequent 'display: inline' [1].
However, a couple of times I've seen IE 7 refuse to play along, and  adding 
'zoom:1' for IE 7 (and 6) was the only way to force it to comply.

[1] http://www.satzansatz.de/cssd/onhavinglayout.html#reset

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to