Forum Moderators: not2easy

Message Too Old, No Replies

How can I make div heights expand fully?

         

zRonin

12:20 am on Jul 14, 2007 (gmt 0)

10+ Year Member



<div class="Alpha">
<div class="Beta">intro</div>
<div class="Gama">
<div class="Delta">long content</div>
<div class="xDelta">short content</div>
</div>
<div class="Gama">
<div class="Delta"></div>
<div class="Delta">medium length content</div>
</div>
</div>

The purpose of this is to emulate a table/row/colum layout. Delta and xDelta are COLUMN divs, Gama is more or less a TR, and alpha is the table.

The problem is that the Delta/xDelta divs may have different heights and one may be taller than the other and visa versa. I would like all Delta/xDelta divs within the same Gama to have the same hight without making them all fixed.

How can I do this?

Marshall

12:43 am on Jul 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There's no easy way to do it. Generally it involves a lot of fancy <div> overlaps and background images.

Marshall

penders

6:29 pm on Jul 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...and background images.

Depending on how flexible you want your layout, you can easily make it look as if both columns are the same height by applying a background-image (repeat-y) to your "Gama" class, which contains your columns. This obviously doesn't actually make your columns the same height, but it can look very effective. Search for "Faux Columns".