-1

I am brand new to html and I hit a wall trying to get words to the right of a picture and the picture be to the left. I have searched this site and I found How do I vertical center text next to an image in html/css? where the code works to an extent. I have a paragraph that I type but half the paragraph goes under the picture plus the picture is in the center.

Please help.

Community
  • 1
  • 1

2 Answers2

0

As mentioned, use

float: left;

Here's an example :

http://jsfiddle.net/6236Q/1/

If you want the text to go below the picture, remove the overflow: hidden;

Kaloyan
  • 7,262
  • 4
  • 32
  • 47
  • Thanks, I am putting the float left next to the img. I'll show you what I did. text. That didn't work. I also went to that site and did the

    and then my text just disappears and my pic is not to the left.

    – James R Apr 11 '13 at 20:25
  • You're not declaring the CSS correctly, check this link for starters - http://matthewjamestaylor.com/blog/adding-css-to-html-with-link-embed-inline-and-import – Kaloyan Apr 11 '13 at 20:30
0
<div>
    <img src="yourimage.jpg" style="float: left; margin-right: 5px;" />
    Lorem ipsum dolor sit amet, consectetur adipiscing elit...
</div>    

margin-right is not necessary, but looks better.

Martin
  • 1,460
  • 1
  • 13
  • 17