If you haven’t done so, open settings, and under “Appearence”, check “Custom CSS”. Then, create a file called obsidian.css in your note directory, and paste this in. It should work then. However, if you use a theme, the file may be overwritten. In that case, you may have to add it back in.