I have a nested list of ul elements. I would like to reduce the font size by a couple of pixels for each level down.
So, for example, the first li elements would have a font size of 18px, then the nested elements of them would have a font size of 16px, and any nested elements of them would have a font size of 14px, etc. However, as soon as the font size reaches a certain size, for example. 8px I would like to stop making them smaller.
These lists are generated on the fly, so I can’t understand how deep they will be, so I can’t just copy the css code to a certain level. Is there a way in css or jQuery where I could apply this type of formatting?
source
share