scss second div child

Solutions on MaxInterview for scss second div child by the best coders in the world

showing results for - "scss second div child"
Salvatore
06 Apr 2019
1<section>
2   <p>Little</p>
3   <p>Piggy</p>    <!-- Want this one -->
4</section>
5These will do the exact same thing:
6
7p:nth-child(2) { color: red; }
8p:nth-of-type(2) { color: red; }
9There is a difference though of course.
10
11
12
13Our :nth-child selector, in “Plain English,” means select an element if:
14
15It is a paragraph element
16It is the second child of a parent
17Our :nth-of-type selector, in “Plain English,” means:
18
19Select the second paragraph child of a parent
20