Forums

Text will not wrap around images (6 posts)

  1. roncurington
    Member
    Posted 11 months ago #

    I cannot get the text to wrap around images no matter what I try. I have set the image with a float:right; and it pushes the <p> below the image. I have set the image inside and outside the <p> and it pushes the text below the image. The only thing that has come close to working is to set the image to float:right; and to set the <p> to float:left and width:auto;. This will actually put the image to the right of the text but the text doesn't actually wrap. Instead it just makes an extra narrow paragraph allowing space for the image. Why does this work anywhere except WordPress?

  2. alchymyth
    The Sweeper
    Posted 11 months ago #

    link to your site, to a post/page with the problem?

  3. roncurington
    Member
    Posted 11 months ago #

    OK this is the post I've been working on.

    Text won't wrap

    Right now I have the text setup like so...

    <p style="float:left;width:auto;">

    and the image is setup like this...

    <div class="advert">
     <img src="/images/sunset.gif" width="217px" height="144px"  alt="Leisure Time Distractions" />
    </div>

    Note I have been trying different variations on this all day so the only reason it's setup like it is, is because this is where I've stopped and it's the only approach that even almost wraps the text. At this point it's hard to imagine that there is something I haven't tried but I'm out of answers and grasping for straws.

  4. alchymyth
    The Sweeper
    Posted 11 months ago #

    i can't find anything wrong when i bring the content back to this setup - the image floats as it should:

    <h1 class="blue18left">Leisure Time Distractions</h1>
    
     <img class="alignright" src="/images/sunset.gif" alt="Leisure Time Distractions" width="217px" height="144px">
    
    <p><a href="http://realhomebusiness.us">Online marketing</a> often takes over e.....

    it could have been the browser cache interfering - try and clear the cache after every change to the stylesheet: press the 'reload' button, or 'CTRL F5'

  5. roncurington
    Member
    Posted 11 months ago #

    Hmmm... Well that is odd. Using the "alignright" class it does wrap correctly in Firefox but when I changed it to "alignright" from the previous setup using a div to set "float:right" and a "float:left; width:auto;" on the paragraph tag which just gave me a narrow paragraph it pushed the content below the image in i.e.

    I dump my cache and see if that does anything for i.e. Usually i.e. will show any changes without doing that. Just a reload and it will reflect any changes made to the CSS file.

  6. roncurington
    Member
    Posted 11 months ago #

    Yep, that did it. It is odd though because I typically work in i.e. all the time and it always shows changes to pages and stylesheets. I run dual monitors and so I will keep a browser open to the page I'm working on and another browser open to the WP editing screen. Make a change and do a refresh on the other browser and it shows the changes. Odd it wouldn't pick this up.

    Thanks' for your help

Reply

You must log in to post.

About this Topic