转:http://252076636.blog.163.com/blog/static/43387593201037102925656/
做浮动的时候经常要用{clear:both;},于是将该定义为一个全局的类,
.clear{clear:both; height:0px; margin:0; padding:0; width:0; border:none;}
但是在实际的使用过程中,IE6下会发生一个怪异的现象,<div class="clear"></div>,这样的清格式的层也会占用高度,但是类定义里已经将高度设置为0了,这里为什么还会出现这样的现象呢?
在网上转了圈回来,重写定义
.clear{ clear:both; height:0px; margin:0; padding:0; width:0; border:none; overflow:hidden; }
我试了不一定有用