Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make an image and a paragraph sit next to each other

I have a box with an image and some txt and I want the txt to be horizontal to the image. I know this may be a pretty easy question but I can't seem to find a good answer on the interwebs. thanks for any help.

<div id='container'>
 <img src='someimage.jpg'/>
 <p>some text</p>
</div>
like image 364
JamesTBennett Avatar asked Jun 24 '10 20:06

JamesTBennett


1 Answers

Take a look at CSS's float property, for example:

<div id='container'>
 <img src='someimage.jpg' style='float: left;'/>
 <p>some text (that will now wrap around the image</p>
</div>
like image 92
Rowland Shaw Avatar answered Sep 24 '22 04:09

Rowland Shaw