Trying to align a text box to the right of a image in html?

sly

New member
I'm attempting to align a box with text directly to the right of a image on my page, which isn't working. I'm also having trouble changing the height and width of the box, as it it huge. I figure that might also be an issue with trying to align the box.. Any help with the codes would be great!

This is the code I'm currently using for both the image and the text-box:

<IMG src="image-is-here"><SPAN style="font-size:small;"><h1 style="background: #000; color: #fff; line-height: 1em; border: 1px solid #f0f;>
<br><br> <P><SPAN style="font-size:small;">Text-is-here</P> </h1>
 
You must float the image to the left. In CSS it is float: left; so try this: <img style="float: left;" src="image-is-here" /> (This only addresses the img tag)

BTW, as you have defined line-height as 1 em, you can just leave it out.
 
Back
Top