0

In the Pseudo-Class Is There No 2nd Child or 3rd Child?

Im curious. #parent p:last-child { color: green; text-decoration: underline; } does second child come in?

20th Aug 2017, 7:51 AM
Rex John
Rex John - avatar
2 Respostas
0
You can use nth-child. Counting the position starts at 0. This should do the trick for the second: p:nth-child(1)
20th Aug 2017, 8:46 AM
James
James - avatar