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 :)
Add
vertical-align: top;
to .dablock
Try
vertical-align: top;
On the img
tag. By default, images flow the text directly at the bottom of the picture.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.