Damien
Damien

Reputation: 333

floating div with table-cell issue

I try to have to div floating side by side.

I have found a solution that work only with text : http://jsfiddle.net/Sy392/2/

For that, i'm using table-cell :

.dablock {
    display:table-cell;
}

But if there is an image that replace the text, the "floating" effect doens't work. http://jsfiddle.net/Sy392/1/

Thanks you for your help :)

Upvotes: 0

Views: 67

Answers (2)

beautifulcoder
beautifulcoder

Reputation: 11330

Try

vertical-align: top;

On the img tag. By default, images flow the text directly at the bottom of the picture.

http://jsfiddle.net/Sy392/5/

Upvotes: 1

user2196728
user2196728

Reputation: 3037

Add

vertical-align: top;

to .dablock

Upvotes: 2

Related Questions