Skip to content

Commit dec68aa

Browse files
committed
New sticky footer mechanism
1 parent 803730a commit dec68aa

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

assets/screen.css

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
1-
/**
2-
* STICKY FOOTER
3-
*/
4-
html, body { width: 100%; height: 100%; }
5-
#wrapper {
1+
/** STICKY FOOTER **/
2+
html, body { height: 100%; }
3+
4+
#wrap {
5+
min-height: 100%;
6+
height: auto !important;
7+
height: 100%;
8+
margin: 0 auto -72px;
9+
padding: 0 0 72px; }
10+
#footer { height: 72px; background: silver; }
11+
/** END OF STICKY FOOTER FUNCTIONAL **/
12+
13+
/*
14+
* Sometimes, first, modern variant don't work because different reasons,
15+
* but we have less stylish bulletproof
16+
** OLD FASHIONED STICKY FOOTER **
17+
#wrap {
618
overflow: hidden;
719
position: relative;
820
min-height: 100%;
921
height:auto !important;
10-
height:100%;
11-
}
12-
#dilator { padding-bottom: 102px; }
13-
#footer { overflow: hidden; position: relative; margin-top: -72px; height: 72px; }
22+
height:100%; }
23+
#wrap .dilator { padding-bottom: 72px; }
24+
#footer {
25+
overflow: hidden;
26+
position: relative;
27+
margin-top: -72px;
28+
height: 72px; }
29+
/** END OF OLD FASHIONED STICKY FOOTER **/
1430

1531
/* Responsive media rules from Bootstrap 3 */
1632
/* DEFAULT IS EXTRA SMALL - less than 768px */

index.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<link rel="apple-touch-icon-precomposed" href="ico/fvc57x57.png">
4949
</head>
5050
<body>
51-
<div id="wrapper">
51+
<div id="wrap">
5252
<header id="header">
5353
</header>
5454

@@ -221,8 +221,6 @@ <h1 id="misc">Misc Stuff - abbr, pre, code, sub, sup, etc.</h1>
221221
<small><a href="#header">[top]</a></small>
222222
</section>
223223
<!-- End of Sample Content (thanks to jonhenshaw http://snipplr.com/view/8121/ ) -->
224-
225-
<div id="dilator"></div>
226224
</div>
227225
<footer id="footer">
228226
</footer>

0 commit comments

Comments
 (0)