Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: wrapping text

  1. #1
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts

    wrapping text

    Seeing as how I appear to be braindead today, can someone please remind me how to wrap text inside a p tag around the left side of an image?

    Thanks....
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #2
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, if the image tag is inside the paragraph, you could float the image right:
    Code:
    p img {
    float: right;
    }
    If that's not what you wanted, just say .

  • #3
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    Here's my HTML code:

    Code:
    <div>
    
    <p class="content_p">blah text here
    
    <img src="picture.jpg" class="picture">
    
    </p>
    
    </div>
    My CSS:

    Code:
    .content_p
    {
    	font-family:times new roman;
    	color:#000;
    	font-size:12px;
    	margin:0px;
    }
    
    .picture
    {
                margin-left:5px;
                margin-bottom:5px;
                vertical-align:text-top;
                float:right;
    }
    The code doesn't work....
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #4
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Woops
    Code:
    p img {
    display: block;
    float: right;
    }

  • #5
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    That doesn't appear to work for me either...sigh

    You can see the page here: http://www.mediamogulsweb.com/Demo_Site/index.php.

    The source code is dynamically generated, so sorry if it's a little cluttered.....

    The picture is of the computer (it's practically the only pic on the page right now....)

    thanks.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Its wrapping fine for me, but if you moved the image outside of the paragraph and float the image to the right it should also wrap. Of course the image would need to come before the paragraph.

  • #7
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    if you moved the image outside of the paragraph and float the image to the right it should also wrap. Of course the image would need to come before the paragraph.
    Thanks, aero, that worked for me....you da best

    now tell me why on earth the image needs to come before the p tag ?? seems loony to me...but, again it worked, so who am i to complain....
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Its almost like when you have a two column layout with the nav on the right and the content on the left. Naturally you would want to float the nav to the right but in order for this to work it needs to come before the content.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •