PDA

View Full Version : div wrapper not extending vertically...



tgil
January 26th, 2008, 09:27 PM
I have a <div id="wrapper"> that is not extending when I add content in it, why? Shouldn't the height extend automatically when I add content? It only extends if I specify a hight. Each page has different amount of content so specifying a height does not work for me. Any idea how I can make my wrapper auto extend vertically as I add content?

Thanks in advance

noblood
January 29th, 2008, 12:56 PM
try #wrapper {position:relative;}

fasterthanlight™
January 30th, 2008, 03:44 PM
Are you floating any elements withing your #wrapper?

add something like <div class="clear_both"></div> right before you end your #wrapper div with a </div>

and then set up a class in your CSS like so:

.clear_both { clear:both; }

It could also not be extending because you are using absolute positioning to place your content within #wrapper. If thats the case, learn to use float and clear and position everything relatively so that your design can breath with your content

jsauni
January 30th, 2008, 08:25 PM
try this:



#wrapper {
min-height: 100px; /*or what ever you want*/
overflow: visible;
}


I'm sure that's what it is.