Home > Div Higher Than the Image it Contains
Div Higher Than the Image it Contains
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; }
Recent comments