Absolute positioned child div expands to fit the parent?

Posted by Amon on Stack Overflow See other posts from Stack Overflow or by Amon
Published on 2009-08-04T18:35:10Z Indexed on 2010/05/10 2:08 UTC
Read the original article Hit count: 221

Filed under:
|

Is there anyway for an absolute positioned child to expand to fill its relative positioned parent? (The height of parent is not fixed) Here is what i did and it is working fine with Firefox and IE7 but not IE6. :(

<div id="parent">
    <div id="child1"></div>
</div>

#parent { position: relative; width: 200px; height:100%; background:red }
#child1 { position: absolute; top: 0; left: 200px; height: 100%; background:blue }

© Stack Overflow or respective owner

Related posts about css

Related posts about internet-explorer-6