On Mar 31, 2006, at 9:55 PM, Gunlaug Sørtun wrote: > David McFarland wrote: >> Is there a good way to hide the backgrounds or borders that can >> appear behind floated elements? For example: http:// >> www.sawmac.com/ tests/float_bg.html >> This is correct behavior--only the content is displaced by the float, >> not the box itself, so its borders and backgrounds appear behind the >> float. But this isn't always desirable. > > h1 {overflow: hidden; zoom: 1;} > > ...to isolate the entire h1 with background, borders and all, from the > float. > As usual you'll have to add in a 'hasLayout'[1] trigger for IE6 (I > used > zoom: 1;),
Brilliant Here's revised version using overflow: hidden; zoom: 1; http://www.sawmac.com/tests/float_bg_overflow.html It works in firefox, safari, ie 5.5, 6 and 7. Opera 8.53, however, doesn't seem to like it much thanks --dave mcfarland ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- 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/