Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

nth-of-type(2):before

p:nth-of-type(2) ==> Selects every <p> element that is the second p element of its parent:

Example
Specify a background color for every <p> element that is the second p element of its parent:

p:nth-of-type(2) {
  background: red;
}
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+1 =