Center text for selected notes (Poetry collection) [CSS]

You can’t use <body> inside <body>. Obsidian is a HTML document, it already has a <body>.

I just noticed your CSS is not written correctly—at least as far as I understand CSS. It should be:

.poetry {
    text-align: center;
}

I.e., no equals sign.

And I got the following to work. You have to use <br /> to force line breaks, is all. (The need for <br /> is a markdown issue.)

<div class="poetry">
	Test  
	<br />
	New test  
	</div>

Screen Shot 2020-08-21 at 9.01.30 AM

2 Likes