I have created a simple grid of divs by left floating them and an empty div with a clear at the end of each row.
This works fine in Firefox, but in IE I get extra ve
IE is a bit funny about empty s - it likes to give them the height of a line of text. If you change .clear to this, it'll shrink to 1 pixel: .clear { clear: both; height: 1px; overflow: hidden; } Put a background colour on to see what's happening 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
s - it likes to give them the height of a line of text. If you change .clear to this, it'll shrink to 1 pixel: .clear { clear: both; height: 1px; overflow: hidden; } Put a background colour on to see what's happening 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
If you change .clear to this, it'll shrink to 1 pixel:
.clear
.clear { clear: both; height: 1px; overflow: hidden; }
Put a background colour on to see what's happening