Home Forums Trusted Pro Center the featured images

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10468
    jcasoft
    Participant

    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?

    #10469
    Andy
    Keymaster

    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)
  • You must be logged in to reply to this topic.