Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

torndownunit

macrumors regular
Original poster
Jan 4, 2009
242
0
Hey guys. I have no code to post because this is just a general question.

I am going to use 'boxes' to describe Divs just to visualize things better.

I am looking to do a layout that has a header, a footer, and a middle content area. Probably 800 pixels wide, 90% of the page in height, and centered in the page.

The problem is I would like the middle 'content' box to expand vertically based on whatever text/content is put into it.

I only seem to have luck with doing the layout if the middle box is a fixed size, which a lot of times is the layout I am using anyway. But if f I try to set it up so it will expand vertically with the content, all my content just runs into my footer and makes a mess. I know I am missing something fairly simple, I just can't figure it out.

Thanks for any help.
 
If it's as simple as the three DIVs you have there it should expand anyway.

Do you have a height declared for the content div? If so that would cause the problem. To get a margin at the bottom of the page add a margin below the footer.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.