Forum Moderators: not2easy

Message Too Old, No Replies

how do I make the columns come out the same length?

         

annej

5:46 am on Nov 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have used the following code to make two columns.

.allcontent {
width:800px;
}

.narrowleft {
width:163px;
float:left;
}

.wideright {
float:right;
width: 635px;
}

But I find the height of the column depends on the text etc in the column. So sometimes the right is longer and other times the left. I would like them to come out the same but don't want to set heights as I don't know how much content would be in any given column. Is there any way to do this?

Marshall

6:53 am on Nov 7, 2007 (gmt 0)

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



Short of setting heights, you need to do "faux columns which employs a background image to give the illusion of equal columns. Search either the net or WebmasterWorld for "faux columns'"

Marshall

annej

2:41 pm on Nov 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the search term to use. I found an alternative to faux columns as well. Search "faux columns revisited" finds that. But all the methods look mind boggling to me and I was trying to simplify my CSS.

I guess I'll try using height and see if that works. Is there a limit on how high "height" can be set?

Gibble

3:48 pm on Nov 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't tried this yet, but I stumbled across it the other day and put it in my bookmarks.

Do a search for
"Relatively Simple 3 Equal-Height Columns CSS Liquid Layout"

SuzyUK

8:31 pm on Nov 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



don't EVER 'fix' the height..

a: it restricts (especially on font resize)
b: any restrictions in CSS will cause a problem sooner or later (CSS does not match with table restrictions)
c: you could very well be fixing OLDer IE errors without even knowing you're fixing them rather than building a web page ;)
d: as soon as you do you will inevitably come across a 'page' that doesn't fit the mold.. if you figure that's OK.. then don't make that the rule.. make it the exception..
e: please just don't! else C related answers will have to double ;)

as an aside (and trying to keep it real) do you know what screen height your customers/browsers are using.. how many toolbars do they deem necessary (non-tech that is..).. how many children do they have in the household who keep adding t/bars. (grrr.. thanks to your ads no doubt!) - hmm above the fold has got way shorter hasn't it..

annej

5:02 pm on Nov 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm so grateful for this forum. Now I won't waste my time trying to set heights for my columns and I know some other strategies to look into.

Thanks you everyone.