Okay, I have the content area of my Wordpress blog theme I'm creating. I want the content area to at least have a height of 600px, but if more content comes then I would like the height to change to what ever is necessary. So 600px automatically, but continue expanding if more content can't fit in the 600px.

Recommended Answers

All 5 Replies

There is a property called 'min-height' but it doesn't work in IE8 or 7 and below.

You can set that property in your css like,

#content {
other properties;
min-height: 600px;

Then you can use jquery if you really want to support old IE

<script language="JavaScript" type="text/javascript">

That works perfectly, but I have another problem. I have a header, footer, content, and sidebar. Now what do I do if the sidebar is bigger than the content. Then my content ends, along with its background-color and border, but my sidebar continues and my blog looks strange.

Plus the min-height works in IE6 and below

Min Height

Use javascript to make the height of the sidebar the height of the content automatically.
Reply to this post if you need help with it, but research it first. I don't just give code snippets out, I help other people learn them. Unless someone else replies with the javascript code before i can help you learn it. Lol.

Plus the min-height works in IE6 and below

Min Height

I wasn't aware of that. When I created my district page, that wasn't true for some reason.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.