Weird vertical space in CSS
CSS
#leftFlyBanner {
position:fixed;
_position:absolute;
width: 118px;
top:180px;
left:10px;
float:left;
}
#leftFlyBanner ul {
margin:0;
padding:0;
list-style: none;
width:118px;
float:left;
}
#leftFlyBanner ul li {
display: inline;
margin:0 ;
padding:0;
float:left;
}
HTML
<div id="leftFlyBanner">
<ul>
<li><TITLE IMAGE></li>
<li id="s2">
<IMAGE1 />
<IMAGE2 />
<IMAGE3 />
</li>
</ul>
</div>
When I open in IE & Chrome there is 开发者_JS百科space between TITLE IMAGE and images below. How can I remove that vertical space? Thanks in advance.
#leftFlyBanner img {
display: block;
}
Add
#leftFlyBanner ul li { line-height:0 }
http://jsfiddle.net/pxfunc/rY3DJ/
精彩评论