Site logo

Archived topic

Featured image in posts are coming out of the container

6 replies · Started by Amit Nair on April 20, 2018

Viewing posts 1–7 of 7

Hi,

I am not sure when this change happened. Earlier it was alright.

My featured images in the posts are coming out of the container frame. This is happening to all the posts.

You could check an example for yourself. Thanks for the help!

For now, I have unchecked the 'Display featured images' for Posts. Please enable it, so you could check the issue.

Hi there,

You have this CSS added:

.single .site-main img {
    padding: 40px 40px 40px 40px;
}

Removing it should fix it.

Hi Leo,

I had used that CSS after working with you on another problem. The other problem was that the images in my blog posts had no space between them and the text. I just wanted padding for the images in the post (that is the images I included as a part of the post) and not the featured image itself.

The featured image should not have any padding.

So please suggest, so that I can have both.

Do you always use align center for the images?

If so this CSS should work better:

.single .site-main img.aligncenter {
    padding: 40px 40px 40px 40px;
}

Hi Leo,

Not necessarily. I have my images aligned to the left, center and right as well.

Ok in that case, try giving the images an extra class, like image-padding, then use this CSS:

.single .site-main img.image-padding {
    padding: 40px 40px 40px 40px;
}
This archived topic is closed to new replies.