I know there's a way to select elements based on the number of siblings by I tried several methods without success.
For example I have 2 forms, one has 3 labels .radio-matrix and the other has 5. I want to style the width of .radio-matrix based on the number of times it appears in .form-matrix.
Can somebody help me? Thank you :)
<div class="form-matrix">
<label class="control-label col-md-3"><p>Escolha um lado</p></label>
<div class="col-md-9">
<label class="label-matrix">
<p>Esquerdo</p><input class="radio-matrix">
</label>
<label class="label-matrix">
<p>Direito</p><input class="radio-matrix">
</label>
<label class="label-matrix">
<p>N/A</p><input class="radio-matrix">
</label>
</div>
</div>
<div class="form-matrix">
<label class="control-label col-md-3"><p>Escolha um lado</p></label>
<div class="col-md-9">
<label class="label-matrix">
<p>Esquerdo</p><input class="radio-matrix">
</label>
<label class="label-matrix">
<p>Direito</p><input class="radio-matrix">
</label>
<label class="label-matrix">
<p>N/A</p><input class="radio-matrix">
</label>
<label class="label-matrix">
<p>N/A</p><input class="radio-matrix">
</label>
<label class="label-matrix">
<p>N/A</p><input class="radio-matrix">
</label>
</div>
</div>