|
Posted by BootNic on 09/15/07 13:56
JL <user@example.net> wrote: news:5l1cacF5pa82U1@mid.individual.net:
[snip]
>>>
>>> #footer {
>>> color: #FFF;
>>> background-color: #000;
>>> padding: 4px 10px; }
>>>
>>> <div id="footer">
>>> <div style="float: left">
>>> <a href="#">Privacy Policy</a> | <a href="#">Site Map</a> </div>
>>> <div style="float: right">
>>> Copyright © 2007 MyComp </div> </div>
>>>
>>> However, if I do this, the black background of the footer div
>>> disappears. I know this is because the floated contents do not prop
>>> up the footer container.
[snip]
>> You can make the footer overflow:hidden.
>>
>> Not because you care about what happens when it overflows but to make
>> it start a new block formatting context, and block formatting context
>> roots _do_ grow in height to fit floats in.
>
> Works nicely in FF but not IE6. Is there a way to get this to work in
> IE6?
<!--[if lt IE 7]>
<style type="text/css">
#footer {
height:0;
overflow:visible;
}
</style>
<![endif]-->
--
BootNic Saturday September 15, 2007 9:56 AM
They always say time changes things, but you actually have to change
them yourself.
*Andy Warhol*
Navigation:
[Reply to this message]
|