-
Notifications
You must be signed in to change notification settings - Fork 4
/
sticky-footer.less
48 lines (40 loc) · 981 Bytes
/
sticky-footer.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@import "htk/_imports/vars.less";
/*
Sticky Footer Solution
by Steve Hatcher
http://stever.ca
http://www.cssstickyfooter.com
*/
/*
* {
margin:0;
padding:0;
}
*/
/* must declare 0 margins on everything, also for main layout components use padding, not
vertical margins (top and bottom) to add spacing, else those margins get added to total height
and your footer gets pushed down a bit more, creating vertical scroll bars in the browser */
html, body {
height: 100%;
}
#wrap {
min-height: 100%;
}
#main {
overflow: auto;
padding-bottom: @footer-height; /* must be same height as the footer */
}
#footer {
position: relative;
margin-top: -@footer-height; /* negative value of footer height */
height: @footer-height;
clear:both;
}
/*Opera Fix*/
body:before { /* thanks to Maleika (Kohoutec)*/
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px; /* thank you Erik J - negate effect of float*/
}