Forum Moderators: not2easy

Message Too Old, No Replies

putting a graphic next to a paragraph

without tables

         

annej

2:56 am on Jul 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been trying different things to get this to work. I want to have a short statement on the left with a picture to the right with a bit of padding between them. I want all this centered on the page.

Everything I try is as complicated as a table plus I still can't get it to work. I really want to start moving away from tables.

Thanks for any help.

Marcia

3:52 am on Jul 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Anne, I generally do that just with HTML, putting the photo in at the beginning of the paragraph with align="right" Then there can be horizontal space designated within the img tag for the photo and it'll create a space to the left of the photo, shifting the paragraph text as many pixels left away from the photo as you designate.

MWpro

4:08 am on Jul 22, 2003 (gmt 0)

10+ Year Member



Using CSS would be a lot easier

Dunno how much CSS you know, but you would put this in your <style> tags or in your external CSS file.


.float {
float: right;
margin: 5px;
}

And this in your document


<img class="float" src="image.gif" alt="" />
Your text here

nowhereMan

6:05 am on Jul 22, 2003 (gmt 0)

10+ Year Member



You can place it in the div and just classify the div and make styles for the things in it:

#container {
text-align:center;
}
#picRightDiv {
width:300px;
margin-left:auto;
margin-right:auto;
text-align:right;
}
#picLeftDiv p {
margin:5px;
}
#picleftDiv img {
margin:5px;
float:right;
}

and in the HTML:


<div class="container">
<div class="picRightDiv">
<img src="picture.gif">
<p>some text</p>
</div>
</div>

This will hopefully center the div and place the image to the right.
try different margins and paddings and width
hope this will help

/ m a r t i n