“The problem happens when a floated element is within a container box, that element does not automatically force the container’s height adjust to the floated element. When an element is floated, its parent no longer contains it because the float is removed from the flow”
http://www.webtoolkit.info/css-clearfix.html
1 .clearfix:after {
2 content: ".";
3 display: block;
4 clear: both;
5 visibility: hidden;
6 line-height: 0;
7 height: 0;
8 }
9
10 .clearfix {
11 display: inline-block;
12 }
13
14 html[xmlns] .clearfix {
15 display: block;
16 }
17
18 * html .clearfix {
19 height: 1%;
20 }
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}
http://www.css3.info/border-radius-apple-vs-mozilla/
1 .round-all {
2 -webkit-border-radius: 5px;
3 -moz-border-radius: 5px;
4 border-radius: 5px;
5 }
6 .round-top {
7 -webkit-border-top-right-radius:5px;
8 -webkit-border-top-left-radius: 5px;
9 -moz-border-radius: 5px 5px 0 0;
10 border-radius: 5px 5px 0 0;
11 }
12 .round-right {
13 -webkit-border-top-right-radius: 5px;
14 -webkit-border-bottom-right-radius: 5px;
15 -moz-border-radius:0 5px 5px 0;
16 border-radius:0 5px 5px 0;
17 }
18 .round-bottom {
19 -webkit-border-bottom-right-radius: 5px;
20 -webkit-border-bottom-left-radius: 5px;
21 -moz-border-radius:0 0 5px 5px;
22 border-radius: 0 0 5px 5px;
23 }
24 .round-left {
25 -webkit-border-top-left-radius: 5px;
26 -webkit-border-bottom-left-radius: 5px;
27 -moz-border-radius: 5px 0 0 5px;
28 border-radius: 5px 0 0 5px;
29 }
.round-all {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.round-top {
-webkit-border-top-right-radius:5px;
-webkit-border-top-left-radius: 5px;
-moz-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
.round-right {
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius:0 5px 5px 0;
border-radius:0 5px 5px 0;
}
.round-bottom {
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius:0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
.round-left {
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius: 5px 0 0 5px;
border-radius: 5px 0 0 5px;
}
1 div { margin: 10px 20px 30px 40px }
2
3 div { margin: 10px 20px 30px }
4
5 div { margin: 10px 20px }
6
7 div { margin: 10px }
div { margin: 10px 20px 30px 40px }
div { margin: 10px 20px 30px }
div { margin: 10px 20px }
div { margin: 10px }
1
2
3
4
5 # Embedded CSS
6
7
8
9
10
11
12 # The opposite technique, targeting only NON-IE browsers:
13
14
15
16
17 # Target specific versions of IE
18 # IE 7 ONLY:
19
20
21
22
23 # IE 6 ONLY:
24
25
26
27
28 # IE 5 ONLY:
29
30
31
32
33 # IE 5.5 ONLY:
34
35
36
37
38 # VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
39
40
41
# Embedded CSS
# The opposite technique, targeting only NON-IE browsers:
# Target specific versions of IE
# IE 7 ONLY:
# IE 6 ONLY:
# IE 5 ONLY:
# IE 5.5 ONLY:
# VERSION OF IE VERSION 6 OR LOWER: (I find this one pretty handy)
source: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
1 html, body, div, span, applet, object, iframe,
2 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3 a, abbr, acronym, address, big, cite, code,
4 del, dfn, em, font, img, ins, kbd, q, s, samp,
5 small, strike, strong, sub, sup, tt, var,
6 dl, dt, dd, ol, ul, li,
7 fieldset, form, label, legend,
8 table, caption, tbody, tfoot, thead, tr, th, td {
9 margin: 0;
10 padding: 0;
11 border: 0;
12 outline: 0;
13 font-weight: inherit;
14 font-style: inherit;
15 font-size: 100%;
16 font-family: inherit;
17 vertical-align: baseline;
18 }
19
20 :focus {
21 outline: 0;
22 }
23 body {
24 line-height: 1;
25 color: black;
26 background: white;
27 }
28 ol, ul {
29 list-style: none;
30 }
31
32 table {
33 border-collapse: separate;
34 border-spacing: 0;
35 }
36 caption, th, td {
37 text-align: left;
38 font-weight: normal;
39 }
40 blockquote:before, blockquote:after,
41 q:before, q:after {
42 content: "";
43 }
44 blockquote, q {
45 quotes: "" "";
46 }
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
1 p {
2 background: green !important;
3 background: red;
4 }
p {
background: green !important;
background: red;
}
create a 1×1 ‘clear.gif’ image
1 var clear="images/clear.gif"
2
3 pngfix=function(){var els=document.getElementsByTagName('*');var i_p=/\.png/i;var i=els.length;while (i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(i_p)&&es.filter==''){el.height = el.height;el.width = el.width;es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src = clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(i_p)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage="none";}}if (el.currentStyle.position!='absolute' && !es.filter && !el.tagName.match(/(body|html|script)/gi)) es.position="relative";if (es.filter&&el.currentStyle.position=="relative") es.position="static";}}
4 window.attachEvent('onload',pngfix);
var clear="images/clear.gif"
pngfix=function(){var els=document.getElementsByTagName('*');var i_p=/\.png/i;var i=els.length;while (i-- >0){var el=els[i];var es=el.style;if(el.src&&el.src.match(i_p)&&es.filter==''){el.height = el.height;el.width = el.width;es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"',sizingMethod='crop')";el.src = clear;}else{var elb=el.currentStyle.backgroundImage;if(elb.match(i_p)){var path=elb.split('"');var rep=(el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';es.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')";es.height=el.clientHeight+'px';es.backgroundImage="none";}}if (el.currentStyle.position!='absolute' && !es.filter && !el.tagName.match(/(body|html|script)/gi)) es.position="relative";if (es.filter&&el.currentStyle.position=="relative") es.position="static";}}
window.attachEvent('onload',pngfix);
http://www.dustindiaz.com/min-height-fast-hack/
1 selector {
2 min-height:500px;
3 height:auto !important;
4 height:500px;
5 }
selector {
min-height:500px;
height:auto !important;
height:500px;
}