Home Forums Trusted Pro Center the featured images

  • This topic has 1 reply, 2 voices, and was last updated 3 years ago by Andy.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10468

    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;
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Center the featured images’ is closed to new replies.