smc Posted January 26, 2007 Share Posted January 26, 2007 Hiya,Basically I'm making the template for my viewstory.php. Basically look at this: http://www.foxnews.com/story/0,2933,247146,00.htmlYou 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 More sharing options...
AndyB Posted January 27, 2007 Share Posted January 27, 2007 Check out the CSS float property. Excellent resource is http://css.maxdesign.com.au/floatutorial/ Link to comment https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/#findComment-170226 Share on other sites More sharing options...
cmgmyr Posted January 27, 2007 Share Posted January 27, 2007 Pretty much just add a float style (maybe with some padding/margin) and your text will move around the image. Link to comment https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/#findComment-170246 Share on other sites More sharing options...
smc Posted January 27, 2007 Author Share Posted January 27, 2007 Close but look:I used the same image for the same size and see the differencehttp://eagleeye5.com/staff/staff_viewstory.php?story=Gasing-up - This is my pagehttp://www.foxnews.com/story/0,2933,247146,00.html - Fox NewsSee 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? Link to comment https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/#findComment-170331 Share on other sites More sharing options...
cmgmyr Posted January 27, 2007 Share Posted January 27, 2007 I can't see your story, it's saying I'm not logged in. Do you have a public version of this? Link to comment https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/#findComment-170333 Share on other sites More sharing options...
smc Posted January 27, 2007 Author Share Posted January 27, 2007 Oh haha I forgot about that. I haven't gotten around to making the public version of it so i've disabled the authentication.Please try again :) Link to comment https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/#findComment-170342 Share on other sites More sharing options...
AndyB Posted January 27, 2007 Share Posted January 27, 2007 [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. Link to comment https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/#findComment-170438 Share on other sites More sharing options...
cmgmyr Posted January 27, 2007 Share Posted January 27, 2007 the page is still not workin for me Link to comment https://forums.phpfreaks.com/topic/35896-wrapping-text-around-generated-picture/#findComment-170575 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.