O'Reilly logo

Pragmatic Guide to Sass by Michael Lintorn Catlin, Hampton Catlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

29Sticking a Footer to a Window

Sticky footers are, as the name suggests, footers that stick to the bottom of your browser. They’re such a hassle to design in CSS. But in Compass there’s a built-in mixin that allows you to make a sticky footer very simply.[12] All you need to define is the height (measured from the bottom of the page) at which the sticky footer floats.

There are three predefined selectors that we apply in this mixin: root, root_footer, and footer. We chose these three because they’ve already been built into Compass. You can see how we use them on the opposite page.

But hey, if you desperately want to use your own selector names, you can! For example, you can change the first ID, root, to a_root in the HTML. In your style sheet, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required