Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created September 9, 2014 07:17
Show Gist options
  • Select an option

  • Save gunnarbittersmann/c8d3f4a68b33294dc44a to your computer and use it in GitHub Desktop.

Select an option

Save gunnarbittersmann/c8d3f4a68b33294dc44a to your computer and use it in GitHub Desktop.
fixed footer behind
/**
* fixed footer behind
*/
body
{
margin: 0;
padding: 0;
background-color: white;
font: 1.2em/3 Georgia;
}
main
{
margin: 0 0 6rem 0;
padding: 0 90% 0 10%;
background-color: inherit;
font-size: 10em;
text-align: center;
}
footer
{
position: fixed;
bottom: 0;
z-index: -1;
padding: 0 10% 0 10%;
}
<main>To boldly scroll</main>
<footer>where no-one has scrolled before</footer>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment