-1

Problem image:

enter image description here

Well, how can you see, there's a border, that blue line below the black image, I need to remove it, but I can't, I don't know how to do it. I need some solutions.

<div align="center" style="background-color:#00F;">
  <img src="images/topimage.png">
</div>
<div>
  <img src="images/topimage bottomborder.png" style="width:100%;height:9px;">
</div>

Above's the code.

Colin Brock
  • 21,267
  • 9
  • 46
  • 61
ptkato
  • 668
  • 1
  • 7
  • 14

1 Answers1

1

Images are by default inline elements, so there, again by default, is space between the bottom edge of an image and the bottom edge of its container.

img {
    display: block
}

Alternatively, this should also work:

img {
    vertical-align: top
}

Us an appropriate selector.

Šime Vidas
  • 182,163
  • 62
  • 281
  • 385