hope somebody can help me. Im desperately trying to get the footer stick to the bottom of the page. i have tried all the examples i have found on the internet, but none seem to work as i want.
here is a pic with the structure of my site:
i need both the main-container and the main to fill the space between the header and the footer. but no matter what i try, they always fit to the contents
any ideas?
10-27-2012, 05:17 PM
auntnini
Need to see your actual HTML and CSS code. An online link to page would be best.
10-28-2012, 09:13 AM
flanagan
thanks for reply,
i have it only in local, so cant give an url. :(
will try to put the code here
<!-- BEGIN: body -->
<div id="main-container">
<div id="main">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
</p>
</div>
</div>
<!-- END: body -->
<!-- BEGIN: FOOTER -->
<div id="footer-container">
<div id="footer">
<p>This is the Footer</p>
</div>
</div>
<!-- END: FOOTER -->
</div>
</body></html>
10-28-2012, 06:49 PM
theyoker
So you only want three main sections of the webpage? As in your picture only has three sections.
Or do you want the multi-coloured background?
<!-- BEGIN: FOOTER -->
<div id="footer-container">
<div id="footer">
<p>This is the Footer</p>
</div>
</div>
<!-- END: FOOTER -->
</div>
</body></html>
10-29-2012, 09:22 AM
flanagan
hi,
yes, i need 3 sections (the 3 containers) that expands horizontaly 100%, and then inside each of them, another div that is at the center.
basically as it is on the code, and it works in part, because the footer always stays at the bottom, the problem is: when there is few content, the footer remains at bottom (thats ok) but i need the "main-container" and "main" divs to always fill the space between header and footer. right now, if there is few content, the main-container and main divs fits to the contents, and so the wrapper (cyan color) shows up.
i mean, what i need is: the header always at top, the footer always at bottom, and the main-container (and also the main that is inside it) to fill all the space between them. so, the wrapper color (cyan) should NEVER be seen.
10-29-2012, 11:07 AM
theyoker
Hello,
Code:
min-height:1000px;
Put this in the main container CSS/ whatever the body is. And it will always be 1000px (horizontal length)change to what you want.