Jump to content

Wrapping text around generated picture


smc

Recommended Posts

Hiya,

Basically I'm making the template for my viewstory.php. Basically look at this: http://www.foxnews.com/story/0,2933,247146,00.html

You see how the text is wrapped around that picture. Both the story and the picture are retreived and generated from a database. My question is how do I do that style of text wrapping. (Note: I basically want to wrap, for example, <?php echo "$storytext" ?> around <?php echo "$picturepath" ?>

Thanks for any help you can offer!
Link to comment
https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/
Share on other sites

Close but look:

I used the same image for the same size and see the difference

http://eagleeye5.com/staff/staff_viewstory.php?story=Gasing-up    -  This is my page

http://www.foxnews.com/story/0,2933,247146,00.html  - Fox News

See how on Fox it wraps along the boarder whereas on mine it starts below. How can I make it more like Fox's?

Edit: By using align=left I kind of did what I wanted but i would like more space in between the picture and the text. How would I do that?
[quote author=smc link=topic=124233.msg514576#msg514576 date=1169868473]
... but i would like more space in between the picture and the text. How would I do that?
[/quote]

forget the align=left stuff. Use CSS's [b]float[/b] attribute. The URL I posted explains exactly how you can do what you want, including controlling the padding around the image on all sides to exactly your requirements.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.