Two floating divs side by side, same height (continued)

My previous question was answered: Two floating divs side by side, same height

My problem: someone gave an example here: http://jsfiddle.net/s7ufg/18/

How to remove excess space under the image?

+4
source share
2 answers

Add vertical alignment: top to the img rule:

img { max-width: 100%; height: auto; width: auto; vertical-align:top; } ​ 

JsFiddle example

+4
source

display:block; to image solve it

 img { display:block; max-width: 100%; height: auto; width: auto; } 

JsFiddle example

+4
source

Source: https://habr.com/ru/post/1435825/


All Articles