Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial2 Answers
Christian Andersson
8,712 PointsYou are only asking what it stands for, so I assume you know what it is and how it works.
if you have
p:nth-child(2) {
background: #ff0000;
}
then the background will change for the 2nd p-element. nth
is just a uniform way of saying the -th of a given number n. For example: 4th, 5th, 6th, 7th... etc. So the n
in the expression nth
is just representing a number - hence the name.
Kaisar Andreti Mustiadi
5,364 Pointshi Christian, Thanks yes I know what it is and how to use it. i was just curious on what does nth stands for..
again, thanks.