0

I have to calculate the width depending on the number of elements inside my parent element. To be more explicit: let's say that I need to know the number of li's inside a ul element. Here is my pseudo code:

width:percentage((floor(100/numberOfLi))-1)/100;

Unfortunately :nth-child, does not provide what I need.

Is there a way to achieve that, if not I will set it using jquery...

Mahj
  • 35
  • 3
Olivier Royo
  • 810
  • 10
  • 13

0 Answers0