Answer the question
In order to leave comments, you need to log in
How can I assign a width based on the number of elements contained in the parent?
Here in ul 2 there is an extra, how to make the width of li 50%. And if there is a surplus of 4, then 25%?
<ul class="slick-dots" style="" role="tablist">
<li class="" role="presentation">
<button type="button" role="tab" id="slick-slide-control00" aria-controls="slick-slide00" aria-label="1 of 2"
tabindex="-1">1</button>
</li>
<li role="presentation" class="slick-active">
<button type="button" role="tab" id="slick-slide-control01" aria-controls="slick-slide04" aria-label="2 of 2" tabindex="-1">2</button>
</li>
</ul>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question