ThemeShaper Forums » Thematic

text not wrapping around aligned images

(3 posts)
  • Started 2 years ago by rickg
  • Latest reply from rickg
  • This topic is not resolved
  1. rickg
    Member

    OK, I have the feeling this will be something simple, but I'm not seeing it.

    I've done a site using a lightly modified version of Thematic using a Child theme, not modifying Thematic itself. However, when I insert images and tell WP to align them (right or left), the text isn't wrapping. I only saw one post on this and it seemed that person had inserted the image in between some heading tags which isn't the case here. The draft site is at http://www.classicwinestorage.com/wordpress

    Right now the child theme CSS doesn't even redefine the alignright and alignleft styles. So, what am I missing?

    Posted 2 years ago #
  2. em hr
    Moderator

    Hi Rickg

    I believe the cause of your woes is wpautop(). WordPress filters the_conent with this function before It hits the page. In a nutshell linebreaks are turned into <p> tags. So your formatting and css is there to treat image the way you want but probably you put a line break before the image in the editor. And now WordPress wants to wrap it in a <p> tag.

    -Gene

    Posted 2 years ago #
  3. rickg
    Member

    Hmm thanks. I actually reposted the image and this is the generated HTML now:

    <div class="entry-content">
    Classic Wine Storage is the only dedicated wine storage facility serving the
    Dallas/Fort Worth area.  In addition to professional storage conditions, CWS
    offers collectors and investors a variety of storage options and wine-related
    services.
    
    <div id="attachment_233" class="wp-caption alignright" style="width: 310px">
    <img class="size-medium wp-image-233 " title="Tasting Area"
    src="http://www.classicwinestorage.com/wordpress/wp-content/uploads/2009/11/IMG_2603-300x225.jpg"
    alt="Tasting Area" width="300" height="225" /><p class="wp-caption-text">Tasting Area
    </div>
    <h2><strong>Safe, Secure, Accessible</strong></h2>

    with the same issue. I've manually broken the img line and the copy above so it doesn't scoot off to the right, but other than that it's accurate.

    :(

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.