I'm doing an exercise in which I have to color all the odd items in one color and the pairs in another.
As I have each article separated by section
, I have implemented in CSS the following:
section:nth-of-type(odd){
background: #DBDBDB;
}
section:nth-of-type(even){
background: #33C9FF;
}
But the only one that works for me is the (even) coloring everything of the color specified in this one.
PS: Excuse me, before I put in two times, but it was because I was messing with him because of the error. I have corrected it several times and it still does not go.
Sorry for the delay I've been fiddling with the code and apparently, as I have already commented some I have had errors in the html. I feel the mess, and thanks for the contribution to all.