You can either make the img
elements block
level:
#gallery > div > img {
display:block;
}
or, change the vertical-align
property value to something like top
. (the default is baseline
)
#gallery > div > img {
vertical-align:top;
}
The second option (vertical-align:top
) should be used in this instance, because you want the text to be inline
with the img
element.