Forum Moderators: not2easy

Message Too Old, No Replies

Image w/ text positioning?

         

alexbeau10

11:48 pm on Mar 24, 2010 (gmt 0)

10+ Year Member



Evening all,

I working on redoing a website at work here and I am fairly new to working with all this and learning as I go.

I am trying to center a picture with a text description next to it inside a div.

|------------------------------------------|
| |
| |img|TEXT |
| |
| |img|TEXT |
| |
|------------------------------------------|

Now these two images and their corresponding text are going to be the only elements with in the div.

I have tried doing this
<img src="" alt="" id="logopic"><p>text</p>


#logopic img {
clear:left;
}

When I do this it aligns the text and image correctly but shifts everything to the left.

How do I go about it so that it looks like the crude drawing I have made?

Any help is greatly appreciated.

Thank you.

Alex

drhowarddrfine

2:30 am on Mar 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are several ways. One of the easiest is just:
<p><img src="1.gif">Stuff</p>

Or you can do:
img{float:left}
<div><img src="1.gif"><p>Stuff</p>

Or you can....
see if that's enough.