There is no way I can make text wrap around images inside my posts anymore.
I know there is a topic about this in the codex, but simply adding those classes to my CSS won’t work.
The problem, as I see it, is that the text is always put inside a <p>, but images with captions are automatically put inside a div. So, the image is never inside the paragraph, causing the html to generate something like this:
<div class=”alignleft”> <img /> </div>
The image+caption div actually floats to the left or right according to the class. But as it is outside of the <p> elements, the text just won’t wrap around the div.
There will always be a block of text above, an image floated with a blank space beside, and another block of text below.
Obviously, as the <p> element renders as a rectangle (as everything), it just won’t assume an “L” shape to wrap around the div image.
Now, when you insert an image without captions, it will work because the <img> will be placed inside the <p> together with text, which will wrap around as expected.
Seems to me this is an bug of latest wordpress versions. Problem is that we have no control on how the DIVs and Ps will organize on the post, since wordpress does it automatically, it is not a theme-layout thing. I can’t just find a way to force the <div> inside the <p>.
Now all my clients websites are screwed up…
So, any help?!
- The topic ‘New "Image with caption" alignment doesn't work at all’ is closed to new replies.