Answers for "select even child css"

CSS
12

css odd even child

tr:nth-child(even) {background: #CCC}
tr:nth-child(odd) {background: #FFF}
Posted by: Guest on February-26-2020
17

nth-child() css

/* Selects the second <li> element in a list */
li:nth-child(2) { 
  color: lime;
}

/* Selects every fourth element
   among any group of siblings */
:nth-child(4n) {
  color: lime;
}
Posted by: Guest on April-12-2020
4

select even child css

li:nth-child(even) { /* Selects only even elements */
    color: green;   
}
Posted by: Guest on May-28-2020
2

select odd child css

li:nth-child(odd) { /* Selects only odd elements */
    color: green;   
}
Posted by: Guest on May-28-2020

Browse Popular Code Answers by Language