Thierry Koblentz wrote:

> Hi all,
> 
> I'd appreciate any comment that would help me improve this article:
> 
> <http://tjkdesign.com/articles/clearing-floats_and_block-formatting_context.asp>
> 
> The demo:
> 
> <http://tjkdesign.com/articles/block-formatting_context/newBFC.asp>
> 
> Thanks
> -- 
> 
> Regards,
> 
> Thierry | http://www.TJKDesign.com

Hi Thierry, I hope your not advocating the use of invalid CSS.

"Setting hasLayout in IE 7"

.newBFC {
overflow: hidden;
_overflow: visible;
_overflow-x:hidden;
_height: 0;
*min-height: 0;
}

The last line is not needed to set hasLayout in IE7 as overflow:hidden already 
does this. The universal selector and the underscore is invalid CSS. For the 
good browsers you can have.

.newBFC {overflow: hidden;}

For IE6 and earlier (hidden from IE mac)

/*  \*/
* html .newBFC {
overflow: visible;
overflow-x:hidden;
height: 0;
}
/*  */

For IE mac (hidden from other browsers)

/*\*//*/ 
.newBFC {display: inline-block;}
/*  */

Having such ugly hacks keeps people aware that sooner or later they can remove 
these hacks from their CSS as these legacy browsers fade away.

Alan
http://css-class.com/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
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