<header class="header">
Sticky Footer using Calc()
</header>
<section class="main">
<h1>Here’s your page content!</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Debitis molestias omnis iusto necessitatibus eveniet quaerat quam qui, hic, aut sequi alias blanditiis quo nesciunt incidunt libero laudantium corporis, quas cumque.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quibusdam deleniti vitae neque illo quod, necessitatibus atque quidem itaque aliquid molestias cumque nesciunt odit vero veritatis obcaecati voluptatem totam expedita, asperiores.</p>
</section>
<footer class="footer">
Here is the super cool “sticky” footer
</footer>
/**
* Browser support
*
* calc() doesn’t work in IE8 or less. It falls back nicely though,
* if calc isn’t supported then you just end up with the footer at
* the bottom of the content. It just isn’t as pretty, which is
* pretty par-for-the-course when it comes to IE8.
**/
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.