Skip to content Skip to sidebar Skip to footer

Div Next To Image

I'm teaching
and i have problem. Div is under image, but I want next to. I tried with setting float, position but nothing help. Jsfiddle (here divs/images are unconnect

Solution 1:

Divs automatically create a line break, because they are block elements. Try using display: inline-block on the div.

I updated your fiddle now: http://jsfiddle.net/aqqUV/3/

Note the code change here:

<divclass="form"style="
    margin-left: 70px;
    color: white;
    display: inline-block;
">

Solution 2:

Just give first image a width and

display:inline-block;
float: left;

and then give these proerties to div following image

display:inline:block;
float:left;

Solution 3:

you could try giving the first div a width and let it float left. the folowing div elements should float next to it, but don't forget to clear:both at the end!

Post a Comment for "Div Next To Image"