Web Hosting Talk







View Full Version : 3 div, same height


ufopsi
01-28-2006, 07:44 AM
Hello,
I'm redesigning my website using xhtml, css and div...saying goodbye to table-based layouts.
I've one issue though: I've 3 columns, one for the navigation (left), one for the contents (middle) and one for the photos (right). I'd like to be able to set the lateral 2 divs to follow in height the div in the middle. As long as it expands, due to the text, the other two expand the same way. So far, as a temporary fix, I've set the same height in pixels... Is there a better way?

WebDesignGold
01-28-2006, 08:36 AM
If your "temporary fix" works, then it's not a temporary fix. But, are you sure it works at all? I doubt it.

Maybe this (http://www.dustindiaz.com/min-height-fast-hack) is what you want?

ufopsi
01-28-2006, 09:30 AM
If your "temporary fix" works, then it's not a temporary fix. But, are you sure it works at all? I doubt it.
Me too. :stickout:

this (http://www.dustindiaz.com/min-height-fast-hack)[/B] is what you want?
Thanks, I'll study that. Visually speaking, my issue is this:
http://img4.imageshack.us/img4/3470/picture16hv.png (http://imageshack.us)

ufopsi
01-28-2006, 10:55 AM
I'm testing the hack, still no luck. :crying:

ufopsi
01-28-2006, 12:33 PM
I think I'm doing something wrong. What about the height in px and the min-height values?

WebDesignGold
01-28-2006, 08:53 PM
At the link I posted, the author is supposed to give a better solution then this one. (http://www.greywyvern.com/code/min-height-hack.html) You may try it as well.

There's also the famous faux columns (http://www.alistapart.com/articles/fauxcolumns) solution published at A List Apart. Check it and see if it solves your problem.

ufopsi
01-29-2006, 09:50 AM
Thank you very much! I've found another way though: setting a background color for the middle column, none for the two and one in the body via css. :peace: :lovewht: