dalpe
06-27-2007, 04:31 AM
Hi,
I have two child divs in a parent div.
One of the childs, namely "child2" will expand the parent div, namely "main".
My objective is to make sure that "child1" also expands the entire height of "main".
See my code below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="height:100%">
<head>
</head>
<body style="margin:0;padding:0;">
<div id="main" style="height:100%;background:red">
<div id="child1" style="height:100%;background:blue;width:100px;float:left">
hello world!
</div>
<div id="child2" style="height:100%;background:green;width:100px;float:left">
this<br/>
text<br/>
expands<br/>
the<br/>
child2<br/>
and<br/>
parent<br/>
div
</div><br style="clear:both"/>
</div>
</body>
</html>
Is there a way to acheive my objectives?
Best regards
Peter
I have two child divs in a parent div.
One of the childs, namely "child2" will expand the parent div, namely "main".
My objective is to make sure that "child1" also expands the entire height of "main".
See my code below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="height:100%">
<head>
</head>
<body style="margin:0;padding:0;">
<div id="main" style="height:100%;background:red">
<div id="child1" style="height:100%;background:blue;width:100px;float:left">
hello world!
</div>
<div id="child2" style="height:100%;background:green;width:100px;float:left">
this<br/>
text<br/>
expands<br/>
the<br/>
child2<br/>
and<br/>
parent<br/>
div
</div><br style="clear:both"/>
</div>
</body>
</html>
Is there a way to acheive my objectives?
Best regards
Peter