WordPress.org

Ready to get started?Download WordPress

Forums

Text Wrapping around Image (4 posts)

  1. rpuddle
    Member
    Posted 3 years ago #

    Hi Guys,

    Been trying to find a solution to this for ages but can't. I've been trying to get a simple wordpress loop coded to show the image from my posts on the left with the post title and excerpt to the right and wrapped around the image.

    For some reason all I seem to get is the first line of the excerpt to the right and at the bottom of the image whilst the rest of the excerpt is below the image and aligned left. I've tried aligning the image left when inserting it into the post, and the style.css contains the following code -

    #content img {
    margin: 0;
    height: auto;
    max-width: 640px;
    width: auto;
    float: left;
    }
    #content .attachment img {
    max-width: 900px;
    }
    #content .alignleft,
    #content img.alignleft {
    display: inline;
    float: left;
    margin-right: 24px;
    margin-top: 4px;
    }

    Any ideas why the text is not wrapping round the image? Any ideas would be much appreciated!?

    Thanks.

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    can you post a link to your site (to the page/post with the image), illustrating the issue?

    formatting depends on the interaction of html and css, which cannot be judged from a few lines of (correct) css code.

  3. rpuddle
    Member
    Posted 3 years ago #

    Hi, thanks for the reply.

    The site i'm having the problem with is the following -

    http://www.its-story-time.com (only a test domain)

    As you can see in the loop the text is not wrapping correctly around the pictures!

    Thanks.

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    if you mean the alignment of the post titles, that has nothing directly to do with the alignment css of the images;
    it is caused by the floats in the css.

    try to add to style.css:

    #centre_body h2 {clear:both;}

    you also may need to add a padding-top: 10px; to the new style.

Topic Closed

This topic has been closed to new replies.

About this Topic