As you can see in the above example , there is extra height of about 6px on the div.
That extra height is gone if line-height is changed to ~1px (link).
So line-height affects images too ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Images by default are defined as inline elements so they follow text rules, you can either set the container height to match the images’, or give the image
display: blockorvertical-align: bottom.