Paul Cho
Paul Cho

Reputation: 1

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 space between TITLE IMAGE and images below. How can I remove that vertical space? Thanks in advance.

Upvotes: 0

Views: 430

Answers (2)

MikeM
MikeM

Reputation: 27405

Add

#leftFlyBanner ul li { line-height:0 }

http://jsfiddle.net/pxfunc/rY3DJ/

Upvotes: 0

Marko
Marko

Reputation: 72232

#leftFlyBanner img {
    display: block;
}

Upvotes: 2

Related Questions