[thelist] absolute vs relative font sizes
Simon Watkins
handymanorama at gmail.com
Tue Jul 17 05:55:08 CDT 2007
Hi,
I have a menu containing some markup similar to this:
<ul>
<li><a href="www.example.com">Item 1</a></li>
<li>Item 2
<ul>
<li><a href="www.example2.com">Item3</a><li>
<li><a href="www.example3.com">Item4</a><li>
</ul>
</li>
<li><a href="www.example4.com">Item5</a></li>
</ul>
where each item in the list can contain either a link or a further list. I
would like to style it so that if an item is a link it has a smaller text
size and if it is a label for a further list it has a larger text size.
There is no way to tell how deep the lists may be nested. If I use:
li{font-size: 12px;}
li a{font-size: 10px;}
then it works fine, but if for example I use:
li{font-size: 1.2em;}
li a{font-size: 0.8em;}
then font sizes grow down the list. Help?
More information about the thelist
mailing list