Center Featured Image On Desktop

Home Forums Calendar Products Events Calendar PRO Center Featured Image On Desktop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1319335
    Neil Duckett
    Participant

    Is there any snippet of code I can add to align the featured Image to the center on a desktop?

    For the most part things look fine when on small screens or mobile but on landscape screens it looks a little skewwhiff.

    Example page … https://www.kink.com.au/venue/the-sydney-hellfire-club/

    Any code would be gratefully received.

    Thanks!

    #1319738
    Geoff B.
    Member

    Good afternoon Neil and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    The best way to handle this is through CSS.

    Try adding the following CSS rule to your style.css file or in your Custom CSS metabox:

    .post-thumbnail img, .wp-post-image, img.size-full, img.size-large {
    margin: 0px auto;
    display: block !important;
    }

    If you are looking to limit that rule to desktop only, you might have to wrap the rule inside

    @media only screen and (max-width : 992px) { }

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1325187
    Neil Duckett
    Participant

    Thanks Geoff, that did the trick.

    Much appreciated.

    Neil

    #1325548
    Geoff B.
    Member

    Good evening Neil,

    I am super stoked that worked to your liking.

    You are welcome back in our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Center Featured Image On Desktop’ is closed to new replies.