PDA

View Full Version : Footer not expanding with rest of content


africano
09-18-2008, 11:32 AM
Hi, I reckon this is a common issue so Ive searched on google but cant seem to find a solution. My footer wont expand with the rest of my content. So when I add a div with an img(example) it places it below the footer.

css for my footer;

#footer {
height: 90px;
width: 100%;
position: relative;
clear: both;
background-color: #3e9a32;
text-align:center;

}

edbr
09-18-2008, 12:44 PM
depends on the rest of the code where you have placed the footer I would think

africano
09-18-2008, 01:00 PM
yeah I think your right. My footer is outside my Wrapper div. I think it also depends on the wrappers css properties. Im currently having a look at this example: http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

Although there are many examples on how to tackle this in google, the problem is finding out which is the correct method of doing it!

domedia
09-18-2008, 02:39 PM
The footer will expand 100% of it's parent element. If you want it wider, you have to expand the parent element.

africano
09-18-2008, 03:41 PM
Im sorry but I dont understand. ive got my main content inside a wrapper div. I want this main content to expand as I add things to it and therefore I need the Footer to expand downwards as the content expands.

d a v e
09-18-2008, 05:13 PM
take away the height

domedia
09-18-2008, 05:36 PM
Im sorry but I dont understand.
If you set something to 90px tall, you just restricted it. If you dno't want it to be 90 px tall, then don't set that value.