[SOLVED] Make a column 100% height

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
handcoded
Forum Members
Forum Members
Posts: 123
Joined: Thu Dec 06, 2007 2:26 pm

[SOLVED] Make a column 100% height

Post by handcoded »

Hi

I'm having problems trying to set my sidebar to 100% height and wondered if someone could help me out.

http://www.richardjordan.biz

Thanks
Last edited by handcoded on Thu Dec 09, 2010 4:12 pm, edited 1 time in total.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: Make a column 100% height

Post by M@rtijn »

Maybe this helps: http://www.alistapart.com/articles/fauxcolumns/

Or another option (which works for me as well) with the use of four div tags - one that contains the sidebar, the main content, and a footer.

First, style the elements in your stylesheet:

Code: Select all

#container {
width: 100%;
background: #FFFAF0;
}

.content {
width: 950px;
float: right;
padding: 10px;
height: 100%;
background: #FFFAF0;
}

.sidebar {
width: 220px;
float: left;
height: 100%;
padding: 5px;
background: #FFFAF0;
}

#footer {
clear:both;
background:#FFFAF0;
}
You can edit the different elements however you want to, just be sure you dont change the footer property "clear:both" - this is very important to leave in.

Then, simply set up your web page like this:

Code: Select all

<div id=”container”>
<div class=”sidebar”></div>
<div class=”content”></div>
<div id=”footer”></div>
</div>
Last edited by Anonymous on Thu Dec 09, 2010 12:52 pm, edited 1 time in total.
Make your community a better place!
handcoded
Forum Members
Forum Members
Posts: 123
Joined: Thu Dec 06, 2007 2:26 pm

Re: Make a column 100% height

Post by handcoded »

Hi

I've played around with the code above and practically re-written the website but I still can't understand why I cannot make my left column 100% in height.
I've tried wrapper classes and id's around the content and specifying these as 100% but with no joy. Could someone please take a look at my code.

www.richardjordan.biz

regards,
Richard

Update

I solved my problem by setting the background colour for the background container.
Last edited by handcoded on Thu Dec 09, 2010 4:11 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED] Make a column 100% height

Post by Dr.CSS »

That look is where I just use an image, no extra voodoo to get a column 100%...
Post Reply

Return to “Layout and Design (CSS & HTML)”