So if I understand correctly, the span will display 1.3x the font of the parent element (ol).I don't want that to happen on this occasion, I want it to just base itself on the default CSS reset and not the ol it's nested in.

What's the best way to go about it?

Black_Max
—
2011-04-11T02:21:16Z —
#2

Without knowing the rest of the code, couldn't you just strip the classes out of both the list and the items, and go bare?

[highlight="HTML4 Strict"]<ol> <li>This is an example</li></ol>`

Rayzur
—
2011-04-11T02:27:36Z —
#3

If you want to get the child back to the base font-size then it would be .5em

2em on that parent is basically the same as 200%, in that case the child would be 50% to get back to base size.

Other than that, either don't get caught in the trap or you can also get out by using pixels on the child.

You shouldn't have any problems with .5em though

.demo {
font-size: 2em;
}
.demo span {
font-size: .5em;
}

<div class="demo">
<p><span>This is an example</span></p>
</div>

dresden_phoenix
—
2011-04-11T02:28:31Z —
#4

MATH! ( and a class)Remember the parent OL bases itself on it's parent and so forth...

for example:

ol#example {
font-size: 2em;
}
ol#example span {
font-size: 1.3em;
}
<ol class="example">
<li><span class="exception">This is an example</span></li>
</ol>
ol#example span.exception {
font-size: .5em; // this will set fontsize to the size of the OL's parent... if that not 100% of the body size you will need to apply more calculations, for example, if the parent size is 1/3 the size of the body then font-size should be: 1.5em...
}

Rayzur
—
2011-04-11T02:34:49Z —
#5

Somebody's using javascript comments in their code

dresden_phoenix
—
2011-04-11T02:59:47Z —
#6

arrrrrrrrrrgh. sorry about that. IT was PHP comments actually... and now everyone can tell what my latest code-infatuation is.

EasyCo
—
2011-04-11T03:01:07Z —
#7

Thanks for the input!

Blackmax, I have spans within my list element because I wish to apply different stylings to content.

Black_Max
—
2011-04-11T04:54:07Z —
#8

EasyCo said:

Blackmax, I have spans within my list element because I wish to apply different stylings to content.

As I said, that overly simplified "duh" comment came from not having any other idea about what you wanted to do. Some of the code heavyweights are now weighing in...