Alex Rivera | Logout

White space at bottom of anchor tag

Asked 2010-07-07T18:11:55.777
73

I have an <a> tag surrounding an image. I have a border set on the div that the <a> tag is in. I have both margin and padding set to 0 but for some reason my <a> tag is still about 3 pixels taller than my image. This leaves a bit of space between the image and the border, which destroys the look that I want to accomplish.

What am I doing wrong? I have tested in both Firefox and Chrome with the same results.

Edit
Report

1 Answer

16

display:block is sufficient for this, if the element has no siblings.

answered 2010-07-07T18:20:10.300

Your Answer