So, I thought I had followed the CSS Wizardry discussion around the nth-child stuff, but apparently, I'm not making a connection somewhere along the lines. I would like to have alternating colors for a repeating section... HTML: <fieldset class="repeating_BAB">
<div class='sheet-row' style='margin-top: 0px; width: 820px;'>
<div class='sheet-col' style='width:156px; margin-top: 0px; margin-bottom: 0px;'>
Weapon
</div>
<div class='sheet-col' style='width:81px; margin-top: 0px; margin-bottom: 0px;'>
Attack#
</div>
<div class='sheet-col' style='width:98px; margin-top: 0px; margin-bottom: 0px;'>
Damage
</div>
<div class='sheet-col' style='width:114px; margin-top: 0px; margin-bottom: 0px;'>
Crit Range
</div>
<div class='sheet-col' style='width:82px; margin-top: 0px; margin-bottom: 0px;'>
Range
</div>
<div class='sheet-col' style='width:122px; margin-top: 0px; margin-bottom: 0px;'>
Type
</div>
<div class='sheet-col' style='width:144px; margin-top: 0px; margin-bottom: 0px;'>
Special
</div>
</div>
</fieldset>
CSS: .repcontainer[data-groupname=repeating_BAB] .repitem:nth-child(even) {
background-color: #e0e0e0;
margin-top: 0px;
margin-bottom: 0px;
}
.repcontainer[data-groupname=repeating_BAB] .repitem:nth-child(odd) {
background-color: white;
margin-top: 0px;
margin-bottom: 0px;
}
So...what am I doing wrong?