Actually, I take that back. That won't work. Try this instead:
li {
font-size: 75%;
line-height: 150%;
}
li li {
font-size: inherit;
line-height: inherit;
}
Main Topics
Browse All TopicsI'm using relative font sizes in my cascading style sheet, and it's working fine throughout the site, except in the nested lists, where I get ever-shrinking font sizes. I've pasted in a section of the style sheet below. Any suggestions?
body {
background-color: #F4FBDF;
font-family: Verdana, Arial, helvetica, sans-serif;
font-size: 75%;
color: #030303;
margin: 0;
padding: 0;
}
p {
font-family: Verdana, Arial, helvetica, sans-serif;
line-height: 130%;
color: #030303;
font-size: 75%;
}
ul
{
font-family: Verdana, Arial, helvetica, sans-serif;
line-height: 150%;
color: #030303;
list-style-type: disc;
font-size: 75%;
}
li li
{
font-size: 75%;
line-height: 150%;
}
ol
{
font-family: Verdana, Arial, helvetica, sans-serif;
line-height: 150%;
color: #030303;
font-size: 75%;
}
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
"font-size: 75%;" means 75% of the font size of the container element.
So, if you set it on bot <ul> and <li>, your <li> will get 75% of 75% (=56.25%) of the element that contains the <ul>.
So, if you use nested lists, you'll get very small fonts very quickly.
The best is to use 100% for "common" elements, so nested common elements don't get a font that is too small.
If you use relative size, then it's better to use values that are between 85% and 100%.
If you want to reduce the size of all fonts, then set a font-size on the <body> of your page:
body {
font-size: 75%;
}
p {
font-size: 100%;
}
ul {
font-size: 100%;
}
ol {
font-size: 100%;
}
li {
font-size: 100%;
}
Note that 100% is the default value, so you actually don't need to specify it.
Amen to GrandSchtroumpf. Also, if you have to have to shrink font sizes in your common elements, you can stop the recursive decrease effect by also styling the nesting of the common elements, e.g.:
body {
font-size: 75%;
}
li {
font-size: 75%;
}
li li {
font-size: 100%;
}
Although as GrandSchtroumpf notes, this should be avoided if possible. It's better not to have a mess of nesting rules cluttering things up. Best to limit the font size initially in the high-level body tag, and then nested containers are set to 100% (or 1.0 em) of that. Makes for cleaner code.
Business Accounts
Answer for Membership
by: HawkePosted on 2005-09-16 at 13:35:31ID: 14901226
It's this part of your stylesheet that's causing the decreasing font size:
li li {
font-size: 75%;
line-height: 150%;
}
Try using just "li" instead of "li li". That should take care of it.