dzilla
dzilla

Reputation: 832

make element at least a certain *height*

I have a center page column design that simulates a piece of paper. On some pages there is hardly any content, however, I would like to keep the middle column at least, say, 1000px, even if there isn't that much content (to keep the footer at the bottom of their viewing screen). Of course, where there IS more than 1000px's worth of vertical content I would like for the page to scroll normally. Is there an idiomatic way to go at least? Would it be wise to use javascript, can you use javascript?

Upvotes: 2

Views: 106

Answers (2)

Roel Veldhuizen
Roel Veldhuizen

Reputation: 4723

Yes, use CSS min-height.

min-height:1000px;

This way you will have at least a height of 1000 px but if the content is larger it will automatically expand.

Upvotes: 2

Michael
Michael

Reputation: 4390

Look at css sticky footer, at http://www.cssstickyfooter.com, I think this is what you are looking for! Also, you can set a div (The wrapper div) with a min-height: 1000px. This should help you.

Upvotes: 3

Related Questions