• Resolved Dutchg

    (@dutchg)


    Text wrap is working fine until I insert a caption, then the wrap breaks. Here are two sample pages: Hello world! with good image wrap, and Hello world!2 with broken image wrap.

    I’ve poked around in the forum seeking the fix, but I haven’t found it. Any help appreciated.

    thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Matt Knowles

    (@aestheticdesign)

    Both look fine using Safari browser. What browser are you using when you see the problem?

    Thread Starter Dutchg

    (@dutchg)

    Ah, interesting. I’m on Chrome, on PC.

    Thread Starter Dutchg

    (@dutchg)

    But IE is showing the same behavior–i.e., breaking when the caption is added. So are you saying, Matt, that 1 and 2 look identical on Safari? … I mean other than 2 having a caption.

    Thread Starter Dutchg

    (@dutchg)

    Any other thoughts on this? I haven’t found the fix yet.
    Thanks for any other ideas.

    Matt Knowles

    (@aestheticdesign)

    Sorry, looking at it again I see the difference. When you add the caption, it wraps the image and caption in a DIV. You can’t have a DIV in the middle of a paragraph, so WordPress has to close the paragraph and start a new one.

    This is a limitation of HTML, not WordPress. The best thing to do would be to move the image up so it is in the code before the paragraph. That way the paragraph can wrap around it.

    Images are inline elements by default, while divs are block elements. You can put inline elements in the middle of a paragraph, but not block elements. Unfortunately, there’s no way to add the caption without wrapping the image in a DIV.

    Thread Starter Dutchg

    (@dutchg)

    Got it, Matt. Thanks. I think I’ll sidestep the issue by making the captions part of the image itself–I need the flexibility of placing the images in the middle of longish paragraphs.

    I appreciate your help in tracking down the issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘image caption breaks text wrap, twenty-twelve theme’ is closed to new replies.