Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJure Rožman
10,232 PointsBootstrap footer - flush it to the bottom
I can't flush footer to the bottom of the page. I am using Bootstrap. I googled it, but it is not working. I don't want it to be fixed at bottom. I want to scroll to get to it, but now is right after my page content and not at the bottom.
4 Answers
thomascawthorn
22,986 PointsThis is one fix (not sure if twitter bootstrap already has this built in!)
You'll need to give your html and body a height of 100%.
Give you footer absolute positioning, bottom: 0, left:0 and width: 100%.
Then go back to your body and assign a padding bottom that is the same as the height of the footer.
e.g. footer height: 200px, body padding-bottom, 200px
This will create a 'sticky' footer.
Leandro Incetta
6,106 PointsHere's the example of what you just explained:
http://ryanfait.com/resources/footer-stick-to-bottom-of-page/
Callum King
6,470 PointsDoes adding the navbar-bottom class not work? For example,
<nav class="navbar navbar-default navbar-bottom" role="navigation">
<div class="container">
<h1>Hello World</h1>
</div>
</nav>
B2B Design and Development
1,680 PointsI tried the code from here http://cssreset.com/how-to-keep-footer-at-bottom-of-page-with-css/ The footer goes to the bottom but a part of the footer is not visible on the page, I have to scroll down to see the full footer. Could you let me know how to correct this issue.
Wayne Priestley
19,579 PointsHi Jure,
This could be caused if you simply don't have enough content on the page to push the footer off the screen.
Add some random content and see if the footer disappears until you scroll down.
Andrew Shook
31,709 PointsAndrew Shook
31,709 PointsJure, can you post your html? Or open a Codepen and link it? That should make it easier for others to help you debug the problem.