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,494
  • 1
  • 21
  • 53

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
  • 219,308
  • 53
  • 366
  • 287
1

One other option...

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

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

isherwood
  • 52,576
  • 15
  • 105
  • 143
1
img {
    display:block;
    margin:0 auto;
}

should fix it.

Paulie_D
  • 102,164
  • 10
  • 117
  • 144