Here are two screenshots showing the issue I am facing:
You can see that the image has a height of 202px, but the li has a height of 208px
Where does the li get the extra 4 pixels of height from and how can I fix it?
Here are two screenshots showing the issue I am facing:
You can see that the image has a height of 202px, but the li has a height of 208px
Where does the li get the extra 4 pixels of height from and how can I fix it?
I think you li
s have display: inline-block
set and that there are line breaks in your source code.
Try :
<li><img... /></li><li><img... /></li>
instead of
<li>
<img... />
</li>
<li>
<img... />
</li>
Or for readability
<li><!-- HTML COMMENT : no line break
--><img... /><!--
--></li>
<li><!--
--><img... /><!--
--></li>
Not so readable after all... ;-)
You must have some margin or padding remaining on your <li>
set margin-top, margin-bottom and padding to 0 (or with negative size) on your elements. It can also due to the spaces in html tag (see comments on your post)
Give use a fiddle or the example, it's easier to help you with it.