View Full Version : Stretchy Div in a Template

12-07-2009, 03:35 PM
Hi Guys,
I have created a template which is working really well, the only problem is some of my pages have a lot more content than others, meaning that the content is overflowing the Div that its going into. Any ideas on how I can get it so that the Div stretches with the content on each individual page?

12-07-2009, 04:33 PM
Just make sure your divs are relative and don't give them a height and they will stretch with your content.

12-08-2009, 03:31 AM
What do you mean?
Put position: relative ?

I have a simuilar question, I have 3 columns and would like all 3 to be the same size on each page which will have different amounts of content. How do I do match all of them up?

12-08-2009, 04:01 AM
making them the same legnth is not possible as such if in a containing or wrapper div, the wrapper will expand with the longest div but using faux images can make them appear the same

12-08-2009, 08:28 AM
Thanks Corrosive, just took the Length amount out and the box just grew and shrank with whatever was in the div

12-08-2009, 08:31 AM
Yep, that's the plan :)

I very rarely use the 'height' CSS property for layout. I like my sites to be as flexible as they can be. The reason I said use relative is so that the divs push down on the divs below. You sometimes get overlap when absolute is used.

Glad you got it sorted anyhoo.