WordPress.org

Support

Support » Themes and Templates » Text Wrapping around Image

Text Wrapping around Image

  • 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Michael

    @alchymyth

    Forum Moderator

    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.

    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.

    Moderator Michael

    @alchymyth

    Forum Moderator

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Text Wrapping around Image’ is closed to new replies.