Forum Moderators: not2easy

Message Too Old, No Replies

two DIV nesting!why they can't evaluate the height automatically

         

allan1022

1:21 am on May 14, 2004 (gmt 0)

10+ Year Member



I have some questions wante to get your help.
In my layout has A,B,C blocks
the height of A changes with it's content
the height of B is fixed
then how can make the height of C change with the height of A automatically
the height of C = the height of A - the height of B
I make C 100% and AUTO all can't work
where is wrong


<div style="width:500px; border:1px solid black;float:inherit;">
<div style="width:200px; border:1px solid black;margin:2px;height:30;float:left"></div>
<div style="width:270px; border:1px solid black;margin:2px;height:30;float:left"></div>
<div style="width:270px;border:1px solid black;margin:2px;height:30;float:left">block A<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
<div style="width:210px; border:1px solid black;margin:2px;height:30;float:left">block B</div>
<div style="width:210px; border:1px solid black;margin:2px;height:30;float:left">block C</div>
</div>

DrDoc

3:31 am on May 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

The "problem" in your case is the use of floating elements. The W3C specification sheds some extra light on the matter:
[w3.org...]
[w3.org...]