The only CSS way to combat this is to set a height to the containing div
s
DEMO http://jsfiddle.net/EgLRh/5/
div{
float:left;
width:100px;
background:green;
overflow: hidden;
text-align: center;
margin:5px;
height:40px;
}
The reason for your problem is that the line is being taken into account as it does in fact exist, it just isn't being show. As a result of the you have the extra space being added.