Caspert
Caspert

Reputation: 4363

HTML image tag seems like have some margin or padding

I am currently working on a new porfolio website development, now I'm the development stage and started walking at a problem. It seems that all image tags a small margin or padding on the bottom have 4px to be exact. I have all the margins and padding to 0 put, but this is not resolved. How to solve this?

I love to hear from you.

Upvotes: 2

Views: 1752

Answers (1)

zzzzBov
zzzzBov

Reputation: 179046

Images typically will be vertically aligned with the baseline of text, which causes a bit of spacing at the bottom. Using vertical-align: middle or vertical-align: top should fix this issue.

Here's an example: http://jsfiddle.net/JgA5F/2/

Upvotes: 4

Related Questions