amahmood
05-04-2005, 10:38 PM
I want to put some divs inside a div (container). I can not specify any height for the containter since I want it to set based on the height of the divs inside it. as long as there is nothing beneath it or the height of last div is greater than other no problems show itself but otherwise it looks as if the containter has the height of zero and the dive beneath the containter behaves odd.
example:
<DIV STYLE='background-color:red;'>
<DIV STYLE='background-color:gray;float:left;'>
<br><BR><BR><BR>hdy<BR>
</DIV>
<DIV STYLE='background-color:yellow;'>
Some Text for test.
</DIV>
</DIV>
<DIV ID='3' STYLE='background-color:blue;'>
TEXT For the forth div
</DIV>
I dare to explain what I want using a table although being exposed to the danger of being lectured about the difference of phylasophy of divs and tables :)
what i need should look like the result of these two tables:
<TABLE>
<TR>
<TD>
some text, some text
</TD>
</TR>
<TR>
<TD>
</TD>
</TR>
</TABLE>
<TABLE>
<TR>
<TD>
</TD>
</TR>
</TABLE>
Hope there is a solution.
Thanks.
example:
<DIV STYLE='background-color:red;'>
<DIV STYLE='background-color:gray;float:left;'>
<br><BR><BR><BR>hdy<BR>
</DIV>
<DIV STYLE='background-color:yellow;'>
Some Text for test.
</DIV>
</DIV>
<DIV ID='3' STYLE='background-color:blue;'>
TEXT For the forth div
</DIV>
I dare to explain what I want using a table although being exposed to the danger of being lectured about the difference of phylasophy of divs and tables :)
what i need should look like the result of these two tables:
<TABLE>
<TR>
<TD>
some text, some text
</TD>
</TR>
<TR>
<TD>
</TD>
</TR>
</TABLE>
<TABLE>
<TR>
<TD>
</TD>
</TR>
</TABLE>
Hope there is a solution.
Thanks.