Reputation: 59586
I am designing a HTML layout using tables. On the left column, I want an image with 10px on top and bottom. Unfortunately, there are a couple of pixels added by the parent div
. I don't know why. I am including a picture:
I have also created a JSFiddle to replicate the issue. I cannot spot an issue in my CSS. Does anyone know what is happening? What am I missing? What is the solution? Thanks!
Upvotes: 1
Views: 93
Reputation: 594
You just need to set the width of the image. div.leftColAd
is 163px x 248px and your image is 160px x 239px
Upvotes: 2
Reputation: 10030
That is due to your image actual width
which is 161px approx. and your div width is 163px approx. You need to add width:100%;
in your img style.
Upvotes: 2