CSS Tricks
June 8th, 2008 | by guda |.clearfix
<div style=”clear: both”> - do you remember this? I hate it.
The people has found a solution for this.
http://www.positioniseverything.net/easyclearing.html
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */
CSS tools
Layout generator - http://csscreator.com/tools/layout
2 Responses to “CSS Tricks”
By blue on Jun 9, 2008 | Reply
Спечели ме за каузата!!
Добра идея, аз също мразя div clear:both подхода.
Някоя друга идея?
By guda on Jun 21, 2008 | Reply
If you have two floating divs in one div and you want to make a border around them, use the following technique
div.container {
border: 1px solid #000000;
overflow: hidden;
width: 100%;
}
http://www.quirksmode.org/css/clearing.html
http://www.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/