Centre images, but not emojis

Hello all,
with the following CSS snippet I have centred the images.
This works as far as I want it to.

img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;

Unfortunately, however, the emojis are also centred. Especially in reading mode, I then have the problem that the emoji is displayed above the headline.

Enclosed is an example:

Is there any way that the emojis can be left-aligned? Possibly by limiting the pixels?
The images that are to be centred are still to be displayed locally via a link in Obsidian.

So with the following command:


I am grateful for any tips and hints!

Edit: In edit mode, the emoji is displayed the way I want it.

@Mirel1 can you share the raw markdown for your emoji with “Test” there?

I just copied the emoji from the Windows clipboard (Win + V), so I don’t have any raw data for markdown.

I could be wrong but I think efemkay is asking for a fuller picture of the note: what is above and below the ![[image]] link?




I apologise, then I misunderstood.

In this document there is only a heading (H1) with an emoji at the front, nothing more.

This is the entire note. The emoji is taken from the Windows clipboard.

# 📄Test

Understood. And what theme are you using? In the default theme using your CSS from the first post, # 📄Test remains on the left for me and images are centered.

1 Like

I use the theme atom and have just set the theme to the default. Unfortunately, the emoji is still displayed incorrectly.

But your post gave me the idea that it might be due to a community plugin, and after a bit of trial and error, my suspicions proved correct. A community plugin has changed the display.

Thank you very much!

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