Reputation: 28148
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.
Upvotes: 1
Views: 1382
Reputation: 10190
For text to wrap around the image, you must have display: inline
as well as a float
set.
You have display:inline
set on the div that contains the div that contains the caption and image, but no float applied. Add float: left
to the parent div of the caption div (the one that already has display: 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 and float: left
to the .alignleft
class (which is what WP assigns to any left-aligned image).
Upvotes: 1
Reputation: 102428
Add a float:left
to the div
with classes wp-caption alignleft
, like this:
.alignleft
{
float:left;
}
Upvotes: 1
Reputation: 18339
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.
Upvotes: 0