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

CSS Mobile-First CSS Layout Mobile-First CSS Layout Creating a Sticky Footer

Janina Alvarez
Janina Alvarez
8,083 Points

Is position: absolute, bottom: 0 an acceptable alternative?

My first thought to solve the "sticky footer" was to set its position to absolute, bottom: 0, and width 100%.

I know there are plenty of reasonable solutions to the same issue using CSS. I was wondering if this alternative was acceptable, or if it posed any issues that makes the solution presented in the video more preferable.

1 Answer

Steven Parker
Steven Parker
231,271 Points

There's rarely just one way to accomplish a programming task. Yet another technique you could use to do this (and one of my favorites) is with "fixed" positioning.

But I think the purpose of this exercise is just to be sure you know how to apply the "sticky" method as shown in the lesson. It's just another tool for your developer's toolbox.