Skip to content

Commit 05924e7

Browse files
committed
New sticky footer
1 parent 40f241b commit 05924e7

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

assets/screen.css

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
/** STICKY FOOTER **/
22
html, body { height: 100%; }
3-
43
#wrap {
54
min-height: 100%;
6-
height: auto !important;
7-
height: 100%;
8-
margin: 0 auto -72px;
9-
padding: 0; }
10-
#wrap .dilator { height: 72px; }
5+
margin-bottom: -72px; }
6+
#wrap:after {
7+
content: " ";
8+
display: block;
9+
height: 72px; }
1110
#footer { height: 72px; background: silver; }
1211
/** END OF STICKY FOOTER FUNCTIONAL **/
1312

1413
/*
1514
* Sometimes, first, modern variant don't work because different reasons,
16-
* but we have less stylish bulletproof
15+
* but we have less stylish bulletproof variant with .dilator block
1716
** OLD FASHIONED STICKY FOOTER **
17+
html, body { height: 100%; }
1818
#wrap {
19-
overflow: hidden;
20-
position: relative;
2119
min-height: 100%;
22-
height:auto !important;
23-
height:100%; }
24-
#wrap .dilator { padding-bottom: 72px; }
25-
#footer {
26-
overflow: hidden;
27-
position: relative;
28-
margin-top: -72px;
29-
height: 72px; }
20+
height: auto !important;
21+
height: 100%;
22+
margin: 0 auto -72px;
23+
padding: 0; }
24+
#wrap .dilator { height: 72px; }
25+
#footer { height: 72px; background: silver; }
3026
/** END OF OLD FASHIONED STICKY FOOTER **/
3127

3228
/* Responsive media rules from Bootstrap 3 */

index.html

-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ <h1 id="misc">Misc Stuff - abbr, pre, code, sub, sup, etc.</h1>
287287
<small><a href="#header">[top]</a></small>
288288
</section>
289289
<!-- End of Sample Content (thanks to jonhenshaw http://snipplr.com/view/8121/ ) -->
290-
<div class="dilator"></div> <!-- part of STICKY FOOTER functional -->
291290
</div>
292291
<footer id="footer">
293292
</footer>

0 commit comments

Comments
 (0)