Last active
December 10, 2015 10:29
-
-
Save ph4un00b/4421560 to your computer and use it in GitHub Desktop.
sticky footer + t.bootstrap + mobile solution :D
This file contains hidden or 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
* {box-shadow: inset 0 0 10px #000000;} | |
.span1{background: #B9D3EE;} | |
.span2{background: #B9D3EE;} | |
.span3{background: #B9D3EE;} | |
.span4{background: #B9D3EE;} | |
.span5{background: #B9D3EE;} | |
.span6{background: #B9D3EE;} | |
.span7{background: #B9D3EE;} | |
.span8{background: #B9D3EE;} | |
.span9{background: #B9D3EE;} | |
.span10{background: #B9D3EE;} | |
.span11{background: #B9D3EE;} | |
.span12{background: #B9D3EE;} | |
.container{background: green;} | |
.container-fluid{background: pink;} | |
.row{background: red;} | |
.row-fluid{background: blue;} | |
#wrap{background: yellow} | |
#footer {background: brown;} |
This file contains hidden or 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 lang="en"><head> | |
<meta charset="utf-8"> | |
<title>Sticky footer</title> | |
<!-- CSS --> | |
<link href="css/bootstrap.min.css" rel="stylesheet"> | |
<link href="css/sticky.css" rel="stylesheet"> | |
</head> | |
<body> | |
<!-- Part 1: Wrap all page content here --> | |
<div id="wrap"> | |
<!-- Begin page content --> | |
<div class="container"> | |
<h1>le content</h1> | |
</div> | |
<div id="push"></div> | |
</div> | |
<!-- Begin footer --> | |
<div id="footer"> | |
<div class="container"> | |
<h2>le footer</h2> | |
</div> | |
</div> | |
<!-- Le javascript | |
================================================== --> | |
<!-- Placed at the end of the document so the pages load faster --> | |
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> | |
<script src="js/bootstrap.min.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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
/* Sticky footer styles | |
* courtesy @martinbean && ryanfait.com | |
*/ | |
html, | |
body { | |
height: 100%; | |
/* The html and body elements cannot have any padding or margin. */ | |
} | |
/* Wrapper for page content to push down footer */ | |
#wrap { | |
min-height: 100%; | |
height: auto !important; | |
height: 100%; | |
/* Negative indent footer by it's height */ | |
margin: 0 auto -60px; | |
} | |
/* Set the fixed height of the footer here */ | |
#push, | |
#footer { | |
height: 60px; | |
} | |
#footer { | |
background-color: black; | |
} | |
/* Lastly, apply responsive CSS fixes as necessary */ | |
@media (max-width: 767px) { | |
#footer { | |
margin-left: -20px; | |
margin-right: -20px; | |
padding-left: 20px; | |
padding-right: 20px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment