Jump to content

Wrapping text around generated picture


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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.