user1040259
user1040259

Reputation: 6509

Two floating divs side by side, same height (follow up)

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

My problem: Someone supplied an example here: http://jsfiddle.net/s7ufg/18/

How can I remove the extra space below the image?

Upvotes: 4

Views: 585

Answers (2)

NullPoiиteя
NullPoiиteя

Reputation: 57322

display:block; to the image solve it

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

jsFiddle example

Upvotes: 4

j08691
j08691

Reputation: 207891

Add vertical-align:top to your img rule:

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

jsFiddle example

Upvotes: 4

Related Questions