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 trial
Luke Bennett
10,265 PointsCSS doing weird things
I have a small pararaph contained in a footer and I want to keep it at the bottom of the page at all times.
I tried using this, but now the footer isn't centrally aligned and also is creating random white space to on right hand side of the we page.
Here is my code:
'''html footer { font-size: 0.75em; text-align: center; clear: both; padding-top: 50px; width: 100%; bottom:0; position: absolute; } '''
1 Answer
Modure Rares
Courses Plus Student 9,041 PointsI f you want yout footer to be on the bottom of the page try wrapping ypur content into a div and add this css
.main-content {
min-height: calc(100vh - 80px);
}
those 80px are the height of the footer. Hope it helps!