You need to create a css file with the wanted code, place it in the right folder and activate it. Step by step:
- Open a plain text editor app (e.g. in Windows you can use Notepad, in Mac TextEdit), place your code there and save file as a *.css file (e.g. mycsssnippet.css)
- In Obsidian go to Settings > Appearance and in “CSS snippets” click in the folder icon in the right side of the pane.
- A new window opens up with the location of the folder where you should put all the snippets you want to add to that particular vault.
- Move your css file to that folder.
- Return to Obsidian Settings > Appearance > CSS snippets and click in the refresh icon on the left of the folder icon.
- Your snippet appears in the list below and you need to activate it in the toggle button in the right side.
- Now you have created your first customization.