• I am using the Dusk To Dawn theme for my website, https://www.projectshandy.co.uk

    I’d really like to have the featured image centred on each post – I know this involves doing something to the css, which isn’t ideal for me as I am a complete coding newbie. I use platforms like wordpress to AVOID having to do anything with code and have no idea what page I even need to open let alone what code I need to search for and replace. Could someone please explain this to me in terms that you would use for a technophobic elderly relative? ??

    Would much appreciate any (simple!) advice on this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi there! Looks like you’ve already activated Jetpack’s Custom CSS module, which is a great way to add CSS.

    Did this CSS you used work for you as you wanted it to or do you still need any help?

    .single-post .featured-image-single img {
         display: block;
         margin: 0px auto;
    }

    Thread Starter ProjectShandy

    (@projectshandy)

    I copied and pasted that code into the Jetpack CSS widget but my featured images are still aligned to the left.

    Moderator Kathryn Presner

    (@zoonini)

    The recommended size for featured images in Dusk to Dawn is at least 588 pixels wide. The theme is designed to display featured images at that width, which is why there is no centering needed, since an image of at least that size is designed to take up the full column width.

    Could you try uploading larger featured images?

    I tried a number of things with custom CSS on a test site but was not able able to get a smaller featured image to center, so I think going with the recommended minimum size is the best way to go unless someone else is able to get an override working.

    Thread Starter ProjectShandy

    (@projectshandy)

    Hi Kathryn

    Thanks for the reply.

    That’s annoying, as I specifically wanted the entries to have a smaller featured image so that it would act as a thumbnail when sharing things to Twitter/Facebook without the image being shrunk or cropped.

    I shall have a rethink on how best to accomplish this.

    Thanks for your advice, that was really useful!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Centre the Featured Image’ is closed to new replies.