Web Developer wrote:
> hey Gunlaug Sørtun, i was just curious, it says "As of IE7, overflow 
> became a layout-trigger." wasnt this a layout trigger in previous IE 
> versions though?
> 
> I remember applying overflow: hidden or auto to divs which contain 
> floats which then contains the floats... i thought the reason was 
> since it gave the parent element 'hasLayout' in IE < 6 as well?
> 
> is this not true?

No.
The overflow property was/is only controlling overflow itself in IE6 and
older, and 'overflow: hidden/auto;' would/will only work properly in
that respect in those old versions if the element had/has specific width
and height. No 'Layout'-triggering effect in IE6 and older.

When using 'overflow: hidden/auto;' to establish a new 'Block formatting
contexts'[1] - which is the effect we're after in standard compliant
browsers, we usually had to - and still have to - reset 'overflow' to
'visible' in older IE to avoid element-collapsing in IE5/win, and then
add a "regular" 'hasLayout' trigger for IE6 and older.

Example: this...
element {overflow: hidden;}
* html element {overflow: visible; height: 1%;}
...is a quite normal "auto-contain" styling that "saves" IE5/win from
collapsing and gives IE5+/win its own 'hasLayout' trigger.

A variant...
element {overflow: hidden;}
* html element {overflow: visible; display: inline-block;}
...works as intended in IE/Mac too in most cases.

None of the above examples are "fool proof", as the 'overflow: hidden'
does what it says and hides what's "over the edge" in all browsers that
sees it. Example...
<http://www.gunlaug.no/contents/wd_example_01_04.html>


regards
        Georg

[1]http://www.w3.org/TR/CSS21/visuren.html#q15
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to