How can I make it easy to center my images with Obsidian Publish?

What I’m trying to do

Provide a simple way to center images.

Things I have tried

I tried adding this CSS from chatGPT to public.css

img[alt*="center"] {
    display: block;
    margin-left: auto;
    margin-right: auto;

And then using this markdown with an image.

![[image.png | center]]

It doesn’t work

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.