Skip to content

Instantly share code, notes, and snippets.

@yvmarques
Created December 11, 2012 14:05
Show Gist options
  • Save yvmarques/4258793 to your computer and use it in GitHub Desktop.
Save yvmarques/4258793 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sticky footer &middot; Twitter Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- CSS -->
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<!-- <link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet"> -->
<style type="text/css">
​html,body{
height:100%
}
#wrap {
min-height:100%;
height:auto !import;
height:100%;
margin: 0 auto -60px;
background-color:lightgray;
}
header {
height:70px;
}
section {
height:100%;
min-height:100%;
}
article {
position:relative;
background-color:lightgreen;
overflow:hidden;
height:100%;
min-height:100%;
}
article .news {
width:100%;
position:absolute;
bottom:0;
background-color:red;
}
#push, .footer {
height:60px;
}
.footer {
padding-top:35px;
background-color:#a3a3a3;
}
</style>
</head>
<body>
<div id="wrap">
<header>Header</header>
<section>
<article>
<div class="news row-fluid">
<div class="span12"><a href="#" class="btn">^</a></div>
<div class="container">
<div class="span6">My News 1</div>
<div class="span6">My News 2</div>
</div>
</div>
</article>
</section>
<div id="push"></div>
</div>
<footer class="footer">
Footer
</footer>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment