I am trying to use the nth selector to alternate colors (#fff and #F4FCEB) of every other response but I'm not having any success. Can anyone tell me what I'm doing wrong?
It’s not the lists you should style but rather the list items because the lists aren’t repeating themselves, they will never be an alternate. Also, there are simple keywords for these cases:
Ah, OK, I think I get it: You want each child of a list to be of the alternate color of the parent? For that the :nth-child pseudo-class doesn’t work. I don’t even know if there is any general selector for this but I don’t think so. You need to do it manually, like:
Code:
.children {[color 1]}
.children ul {[color 2]}
.children ul ul {[color 1]}
.children ul ul ul {[color 2]}
…
Almost there, only trouble now is I have a list-style-type:circle on my original comment (10:27 a.m.) that I want off. Can't find the style. - ?
Code:
.children ul{
background-color:#fff;
margin:10px;
padding:12px;
list-style:none;
/*border:2px solid #C1E0FF;*/
-moz-box-shadow: inset 0 0 8px #888;
-webkit-box-shadow: inset 0 0 8px#888;
box-shadow: inset 0 0 8px #888;
list-style-type:none;
}
.children ul ul {background-color:#f4fceb;}
.children ul ul ul {background-color:#fff;}
.children ul ul ul ul {background-color:#f4fceb;}
.children ul ul ul ul ul {background-color:#fff;}
.children ul ul ul ul ul ul {background-color:#f4fceb;}
.children ul ul ul ul ul ul ul {background-color:#fff;}
li.comment-body {list-style-type:none;} (that's not it).