otepoti — 2012-02-01T16:50:17-05:00 — #1
Hi. Could you please tell me what would be good code that I can use on my websites that ensures that all columns keep equal lengths athe bottom so that one column doesn't stay short while others are long because of items entered in these columns.
pestcontrol101 — 2012-02-08T03:45:38-05:00 — #2
marplo — 2012-02-08T08:10:55-05:00 — #3
An example and JS code is in this tutorial Make HTML elements the same height.
otepoti — 2012-02-08T15:01:13-05:00 — #4
Thank you to all who repied.
otepoti — 2012-02-08T16:50:06-05:00 — #5
Thank you to all who replied. I like James Taylor site and tutorials so well done Pestcontrol101. MarPlo thank you too as the site your recommended has some good tutorials as well. Much appreciated.
pestcontrol101 — 2012-02-08T19:42:47-05:00 — #6
My pleasure Paul. It's good to know that I've helped you somehow.
paulob — 2012-02-14T16:50:51-05:00 — #7
I see you have already had some good suggestions and each method has its advantages and drawbacks.
The negative margin approach is a a good method but add some complexity to the site not to mention extra elements. It can be awkward to tweak the design once completed because you have to adjust everything else to suit so maintenance can be awkward. However it does work well when implemented properly.
If you have a fixed width site (or fixed width column) then the "faux column" approach is an easy solution then seldom needs extra markup as it often lends itself to the existing structure. The drawbacks are that you have to make an image each time you want a colour change.
If IE8+ support only is required then you can use the display:table properties for your equal columns and in most cases will need no extra markup.
A technique I often use for full length columns is to use an absolute overlay and was recently discussed in this thread.
pestcontrol101 — 2012-02-16T02:30:33-05:00 — #8
Great to hear that...It's good that you have actually undertaken all such details.
otepoti — 2012-02-16T03:52:11-05:00 — #9
Thanks Paul. Would this work for a three column site? Like, first column for navigation, centre column for contents and right column for other info or adverts? Thanks for your help sofar. Appreciated. Paul
paulob — 2012-02-16T05:00:15-05:00 — #10
You could use display:table for IE8+ and then feed ie7 some other rules with a runtime expression and then you won't need any extra markup.
Here's an example:
In a fluid layout IE7 and under may round dimensions awkwardly at times.
Here are some other examples without using the expression.
Of course the easiest approach would be to give equal columns to ie8+ (using display:table) and just let ie7 and under have content height columns.:)