This content originally appeared on Bram.us and was authored by Bramus!
Because I keep forgetting this, an entry on the blog so that my future self can find it back easily:
CSS: Want your first 5 list items to be bold?
li:nth-of-type(-n + 5) {font-weight: bold;}
Start with the # of list items you want to impact, then increment backward with -n.
— Estelle Weyl (@estellevw) June 21, 2022
This content originally appeared on Bram.us and was authored by Bramus!
Bramus! | Sciencx (2022-06-21T11:39:29+00:00) CSS: Select first x items. Retrieved from https://www.scien.cx/2022/06/21/css-select-first-x-items/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.