• Resolved wattsyy94

    (@wattsyy94)


    Hi all.

    Wondering if anyone could help with my image and captions misalignment.

    When I’m keeping my images on the left side of an article, the captions are staying in the center of the article rather than in the center under the image. How do I change it so that captions are always centered under an image whether on the left or the center of the article?

    If anyone can help, thanks a lot.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter wattsyy94

    (@wattsyy94)

    Hi @wattsyy94

    That’s the default Gutenberg behaviour, as far as I know. Though, it can easily be changed with a bit of CSS, like this —

    .entry-content figcaption {
        text-align: left !important;
    }

    Hope this helps!

    Thread Starter wattsyy94

    (@wattsyy94)

    Thanks Eduard!

    But where do I enter this code? (sorry I’m a noob)

    in the additional CSS part?

    Thank you.

    Yup, the Customiser -> Additional CSS pane is the place to do it. 🙂

    Thanks!

    Thread Starter wattsyy94

    (@wattsyy94)

    so that worked at bringing the captions to the left side, but is there any code to have the caption in the center of the image whether the image is left or right?

    thanks again dude.

    Hi @wattsyy94

    Sorry, but that’s a little bit impossible, due to the way the HTML is structured by the Gutenberg editor. It would require manually implementing margins/paddings for absolutely each image and that isn’t feasible.

    Unless Gutenberg devs decide to change how their HTML is structured, I’m afraid that this is extremely cumbersome to achieve.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘image and caption unaligned’ is closed to new replies.