1 reply [Last post]
rebelia's picture
Last seen: 18 years 32 weeks ago
Joined: 2004-01-02
Posts: 6
Points: 0

hi Smile

i have a


structure made with divs in my webpage (external, top-center-bottom and the center containing left-center-right, to be exact) and this is the template page

top and bottom will be always the same and more or less left and right too, but the central div, the one containing my info changes for every page continuously (php language)

if the layout is made with tables, there's no problem, i can obtain all the three cells (left-center-right) to be of the same lenght of the longest of them

is it possible to obtain the same with divs? i mean: is there a way with css to "enchain" the lenght of a div to the lenght of another? to the longest, doesn't matter which one of them?

thank you Smile

dJomp's picture
Last seen: 6 years 27 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

header - left/center/right - footer layout with divs

It does depend on what you're trying to achieve.

If you're having trouble getting the bottom DIV to the bottom, tryclear:both;

If on the other hand you want them to stretch to the same length... I don't think there is a way.

Well actually you might want to try this (untested) - it assumes the left/middle/right are all floated...

In the bottom of each of the left/middle/right put <br style="clear : both;">. It might not work in IE, but in other browsers it should. Might. Not sure.

Sorry, babble.

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.