1

enter image description here

You can the image, and this the demo http://jsfiddle.net/yJUH4/8/

As you can see in the picture a small gap is coming between image and the Container. Image is already give css vertical-align:middle. When i increase the height of the container it works perfectly. Waiting for a good answer

Dinesh Kanivu
  • 2,551
  • 1
  • 23
  • 55

3 Answers3

7

Set vertical-align:top on the img

img {
    vertical-align: top;
}

jsFiddle here

By default, the vertical-align property isn't top, but rather baseline. By simply setting it to top, you can achieve the desired result.

Josh Crozier
  • 233,099
  • 56
  • 391
  • 304
1

One other option...

td {
    display: inline-block;
    padding: 0;
}

http://jsfiddle.net/isherwood/yJUH4/11/

isherwood
  • 58,414
  • 16
  • 114
  • 157
1
img {
    display:block;
    margin:0 auto;
}

should fix it.

Paulie_D
  • 107,962
  • 13
  • 142
  • 161