- This topic has 1 reply, 2 voices, and was last updated 4 years, 7 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The topic ‘Center the featured images’ is closed to new replies.
Home › Forums › Trusted Pro › Center the featured images
Is there a CSS code that I can add to center the featured images on both my pages and blog posts? Every time I add a featured image, if it isn’t large enough to fill the area, it aligns left by default. How can I fix this?
Yes, this CSS code will center the featured image.
.single .wp-post-image {
display: block;
margin-left: auto;
margin-right: auto;
}