I’ve created a blog using WordPress and am attempting to add images to each post. The images don’t seem to work ‘inline’ though. I have attempted add inline styles (using Chrome dev tools) and cannot seem to get the paragraphs to wrap.
Leave a Reply
You must be logged in to post a comment.
For text to wrap around the image, you must have
display: inline
as well as afloat
set.You have
display:inline
set on the div that contains the div that contains the caption and image, but no float applied. Addfloat: left
to the parent div of the caption div (the one that already hasdisplay: inline
set as an inline style) and the text will flow around the image.Or remove that parent div entirely (since it’s totally extraneous and has no real purpose) and simply apply
display: inline
to the.wp-caption
class that is applied to the caption div that contains the image andfloat: left
to the.alignleft
class (which is what WP assigns to any left-aligned image).Add a
float:left
to thediv
with classeswp-caption alignleft
, like this:You need to remove the div that surrounds the image and place the images inside the paragraph tag. When the images is inside the
p
tags you can then align left/right and the text will flow around them.