While working on my tribute page for a famous magician I thought it would be cool to use card symbols (clubs, hearts, spades, diamonds) instead of bullets in an unordered list.
I can get rid of all bullets and add a unicode to the beginning of each string inside an li.
list-style-type: none;
li ♣ content /li
Or I can change the bullet itself by doing this.
li:before { content: ‘\2663’; }
But I don’t know how to change the li:before to a different content (i.e. a new playing card symbol) and make a new list on the same page. So I could have a list starting with clubs, then a new list starting with hearts etc.
And ‘that’, with your help is what I would like to do.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
you used li:before, now you use a class name instead of an element name, if class is myClass you write .myClass:before selecting the pseudoelement for that class