Home > Div Higher Than the Image it Contains

Div Higher Than the Image it Contains

August 2nd, 2012 Leave a comment Go to comments

I came across this simple problem when placing a sole image inside a div: the div always ended up being a few pixels higher than the image. Notice the few blank pixels below the image. After some searching, the solution was applied using CSS:

img { display: block; }
Tags:
  1. No comments yet.
  1. No trackbacks yet.