i have something like this
<body>
<h2>
Blue
<span>
<a ....>add to combo</a>
</span>
</h2>
</body>
and css
#body {font-size: 100%}
h2{font-size: 200%}
a{font-size: 80%}
Now I’ve been reading up and realize that the a link won’t be 80% of 100% but 80% of 200% (of 100%) because percentages are taken from the parents’ sizes.
However I’d like all my font-size declarations in percentages without inheriting, but rather just to calculate from some site-wide base font-size – say 16px?
How do you do that?
What you want is not possible with your give code. You want to inherit font 1 particular size, then every font-size in childNodes will be relative to the parent.
if you want to use certain font sizes and not inherit you should explicitly set them
That said never try to use the important statement. Please checkout how CSS assigns his properties to HTML nodes
http://www.w3.org/TR/CSS2/cascade.html#specificity