Skip to content

Instantly share code, notes, and snippets.

@aarongarciah
Created June 3, 2015 13:54
Show Gist options
  • Save aarongarciah/c450191c913c79178720 to your computer and use it in GitHub Desktop.
Save aarongarciah/c450191c913c79178720 to your computer and use it in GitHub Desktop.
<html>
<head>
<link rel="stylesheet" href="layout.css" />
</head>
<body>
<div class="wrapper">
<p>Your website content here.</p>
<div class="push"></div>
</div>
<footer>
<p>Copyright (c) 2008</p>
</div>
</body>
</html>
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
margin: 0 auto -155px; /* the bottom margin is the negative value of the footer's height */
}
footer, .push {
height: 155px; /* '.push' must be the same height as 'footer' */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment