Last active
December 17, 2015 14:39
-
-
Save maehler/5625809 to your computer and use it in GitHub Desktop.
A simple setup for a sticky footer (http://ryanfait.com/sticky-footer/) using the unsemantic CSS framwork (http://unsemantic.com/).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { height: 100%; } | |
.wrapper { | |
min-height: 100%; | |
height: auto !important; | |
height: 100%; | |
margin: 0 auto -50px; | |
} | |
.grid-container { | |
height: 100%; | |
} | |
.grid-container > footer, .wrapper > .push { | |
height: 50px; | |
clear: both; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>unsemantic sticky footer</title> | |
<style> | |
* { margin: 0; } | |
</style> | |
<link rel="stylesheet" href="unsemantic-grid-base-tablet.css"> | |
<link rel="stylesheet" href="sticky.css"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<div class="grid-container"> | |
<div class="wrapper"> | |
<header class="grid-100"> | |
<h1>unsemantic sticky footer</h1> | |
<code><header></code> | |
</header> | |
<div class="grid-10 suffix-90"> | |
<p>This is a sticky footer for the unsemantic CSS framework</p> | |
</div> | |
<div class="push"></div> | |
</div> | |
<footer class="grid-100 align-center"> | |
<p>Niklas Mähler 2013</p> | |
<code><footer></code> | |
</footer> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.align-center { text-align: center; } | |
.wrapper > header, .grid-container > footer { background-color: gray; } | |
.grid-container { | |
border-left: 1px solid black; | |
border-right: 1px solid black; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment