Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- hasLayout - Microsoft's own CSS logic?


SuzyUK - 5:05 pm on Jul 19, 2005 (gmt 0)


Thanks encyclo.. the subject has fascinated me for a while

>>the Hacks that are used to trigger hasLayout
I'm just not sure what will happen, there are loads of "what-ifs" out there but I'm still reading!

The underscore hack, and * html hacks could theoretically be compromised quite easily if they fix stylesheet parsing.

No matter which hack you use at present the solution (hasLayout trigger) of setting a small height, even 0 does actually, on the element is what needs watching.
Although hopefully it could continue to be used inside a version specific conditional comment, for backwards compatibility. I presume IE will have to continue to support CC's because they're theirs anyway.

But the worry is what happens if somehow IE actually manage to fix the "auto enclosing/stretching" behavior of height and width, but not the other rendering issues, this would mean we then have to find another way to trigger layout. (note: when I say fix, that's very tongue-in-cheek..) So I'm just very aware that the "dimensioning" solution itself may very well break, leaving us to find another method of fixing some of the usual display errors.

I hope designs will not "break", but I just can't see how they can properly fix their CSS support by hacking this property, maybe they're not going to do this, maybe they're planning something radically different (geez they may even introduce a new proprietary property!) which really might then include breaking designs.

I was wondering however if rather than waiting to see it might be safer to remove any existing layout hacks into a specific conditional comment in readiness?

I get the impression that understanding the implications of hasLayout is critical to understanding IE behaviour.

I agree, not that I want to become entrenched in IE's inner workings ;) but it's looking increasingly like this property has been the sole cause of thousands of CSS developer's headaches. So I'd say it is crucial to at least be aware of it so we can understand that it may have more implications.

btw: just to clarify.. I'm not advocating the use of display: inline-block; as a hack/trigger, indeed I haven't tested anything with it yet to see if it actually works on anything other than itself ;) I was just randomly connecting things..

Suzy


Thread source:: http://www.webmasterworld.com/css/6999.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com