View Full Version : Div stretching problem
Revolution
09-01-2006, 04:38 PM
I have a small problem... when I add enough text to expand the content area, how can I get the side divs to stretch/expand like the content area does?
http://www.integratedgraphics.ca/rockytest/divindex.html
Revolution
09-01-2006, 08:56 PM
bump? i really want to finish coding this but i can't figure it out :(
Arbitrator
09-01-2006, 09:20 PM
The short answer is that you can't without tables. The best solution isn't supported by Everybody's Favorite Browser.
1. display: table-cell
2. fake it
3. JavaScript
4. tables
Revolution
09-01-2006, 09:35 PM
hmm... that kinda sucks. I tried using the display: table-cell and it doesn't seem to work. how would I fake it? and how would I use Javascript for this? I'll keep tables as my last resort
Arbitrator
09-01-2006, 10:11 PM
display: table-cell works if you put two boxes with that on it side by side inside another box. The boxes will mimic one another's height like two horizontally adjacent table cells would. Internet Explorer 6/7 doesn't support this CSS property.
You would fake it by using a background color or repeating image on an element containing the navigation element such as the layout container. For JavaScript you would calculate which box is longer and set the height of the other box to match; using JavaScript will result in delays as the dimensions are recalculated when the user resizes the window and fails when the user doesn't have it enabled.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.