Drupal 7 – Apply sticky footer in Omega theme

We can make the section-footer sticky in Omega theme by adding the following piece of code in <your-theme>-alpha-default.css.

/* sticky footer */
html, body {height: 100%; margin: 0;}
#page {display: table; width: 100%;}
html>/**/body #page {height: 100%;}
*:first-child+html #page {height: auto;}
.section {display: table-row;}
html>/**/body .section-content {height: 100%;}
*:first-child+html body .section-content {height: auto;}

 

Kudos to Karl Kasischke.

Done =)

Reference: Has anyone tried to get a sticky footer to work with Omega?

Advertisement

16 thoughts on “Drupal 7 – Apply sticky footer in Omega theme”

  1. Hello, quick question. When I do this it leaves a blank space between my content and my footer if the page is not long enough. Is there any way I can also expand the content div? I’ve been trying to figure it out, not getting far.

    Thanks

    Like

      1. Ideally the content section would expand, so the footer is on the bottom of the page, and there is just empty content background between the bottom of the content and the top of the footer (instead of white space).

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.