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! Quote Link to comment 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/ Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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? Quote Link to comment 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 :) Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.