Unwanted extra right space in HTML layout

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:

enter image description here

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

Answers (2)

P1nGu1n
P1nGu1n

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

Talha Akbar
Talha Akbar

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.

Working Fiddle

Upvotes: 2

Related Questions