Forums

How to Wrap Text? (8 posts)

  1. mrslice
    Member
    Posted 7 years ago #

    Is there a plugin or hack (or any way at all) that allows for the wrapping of text around an image in a post?

  2. Mark (podz)
    Support Maven
    Posted 7 years ago #

  3. mrslice
    Member
    Posted 7 years ago #

    Hmmm. That seems to be updating and modifying the base template files, which I really don't want to mess with. I just want to be able to wrap the text on demand in the post when I feel it is needed, like in Typepad and some other blogging programs.

  4. mrslice
    Member
    Posted 7 years ago #

    *bump*

  5. Jinsan
    Member
    Posted 7 years ago #

    I had this same queston....and found a sort of solution. If you want to specifiy which images are wrapped then you need to use unique classes.

    In your CSS use this:

    img {
    float: left;
    padding: 1opx;
    }

    For the example above all you do is make your post as normal and insert the image, nothing else needed.

    I use something similar, but I've now added other bits which I want to add to the quicktags but not sure how you add classes to quicktags (podz?). So what do you do if you don't want all your images to align that way? What if you want your default image to use the default settings and prefer to use seperate classes for other specific images?

    So for example, product images are labelled in the css as follows:

    img.product {
    float: right;
    padding: 15px;
    }

    img.thumbnail {
    float: left;
    padding: 15px;
    }

    For the two above in your post you would use:

    <img class="product" src="yoursource"> to display your product to the right with the text wrapped around it. Then you can add:

    <img class="thumbnail" src="your source">` to display a thumnail to the left of the text later on.

    All your default images would align left anyway, with the text not wrapped around, again you can change this as above. I'm not specifally sure how to wrap text around both sides so that the text wraps tot he left and right with the image in the middle.

    Hope that helps. Dunno if it's worth adding to the codex? It's a nice feature.

  6. mlw
    Member
    Posted 6 years ago #

    This solution works pretty well, but does it matter where I put the
    img {
    float: left;
    padding: 1opx;
    }

    Also, my text butts right up against the image. can I increase padding somewhere? Thanks!

  7. Lorelle
    Member
    Posted 6 years ago #

    There are two good articles about this subject in the Codex:

    http://codex.wordpress.org/Wrapping_Text_Around_Images
    http://codex.wordpress.org/Using_Images

  8. musk
    Member
    Posted 6 years ago #

    perfect. couldn't get the "caption" to work, but got the padding to work. thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags