CSS: Select first x items

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) …

Because I keep forgetting this, an entry on the blog so that my future self can find it back easily:


Print Share Comment Cite Upload Translate
APA
Bramus! | Sciencx (2024-03-28T19:51:10+00:00) » CSS: Select first x items. Retrieved from https://www.scien.cx/2022/06/21/css-select-first-x-items/.
MLA
" » CSS: Select first x items." Bramus! | Sciencx - Tuesday June 21, 2022, https://www.scien.cx/2022/06/21/css-select-first-x-items/
HARVARD
Bramus! | Sciencx Tuesday June 21, 2022 » CSS: Select first x items., viewed 2024-03-28T19:51:10+00:00,<https://www.scien.cx/2022/06/21/css-select-first-x-items/>
VANCOUVER
Bramus! | Sciencx - » CSS: Select first x items. [Internet]. [Accessed 2024-03-28T19:51:10+00:00]. Available from: https://www.scien.cx/2022/06/21/css-select-first-x-items/
CHICAGO
" » CSS: Select first x items." Bramus! | Sciencx - Accessed 2024-03-28T19:51:10+00:00. https://www.scien.cx/2022/06/21/css-select-first-x-items/
IEEE
" » CSS: Select first x items." Bramus! | Sciencx [Online]. Available: https://www.scien.cx/2022/06/21/css-select-first-x-items/. [Accessed: 2024-03-28T19:51:10+00:00]
rf:citation
» CSS: Select first x items | Bramus! | Sciencx | https://www.scien.cx/2022/06/21/css-select-first-x-items/ | 2024-03-28T19:51:10+00:00
https://github.com/addpipe/simple-recorderjs-demo