cool, no feedback, I`ll assume no one from adobe browses this forum either..
1 person found this helpful
I don't fully understand the question but I assume you're trying to understand how CSS specificity calculations are made.
CSS and HTML are independent and inter-dependent. HTML tags provide 'hooks' whereby individual page elements can be targeted for styling in a CSS stylesheet.
See if this article helps with CSS
I`m reading the missing manual book on cs4 and have a good grasp on specificity and the cascade now, I was just confused as to inheritence itself which is properties being passed down the html nesting order.
I wasn`t sure whether properties got passed down the cascade also, but in a sense this principal takes place as the last rule wins in the cascade, unless a css style name carries more specificity.
inheritence refers to the parent/child nesting of tags and how their properties are passed down to child tags, unless a child tag has its own property:variable set..
a couple of good refs:
thanks for the link I`ll check it out..
Inheritance is a mechanism that’s separate from the cascade:inheritance applies to the DOM (Document Object Model) tree, while the cascade deals with the style sheet rules. However, CSS properties set on an element via the cascade can be inherited by that element’s child elements.
For example, if a
divelement has a
20pxthen, assuming that no other
font-sizedeclarations have been explicitly defined, any children will also inherit that
Why is this a good thing? Consider the following code:
This <em>sentence</em> will have a 20px
If inheritance wasn’t at work in the above code, we’d have to specify a
font-sizedeclaration for each element in turn, to make sure that all the content in the sentence was rendered at
With inheritance working in our favor, we merely have to set the
font-sizeon the parent; all the children will inherit the
font-sizeautomatically. This is why you only need to set the
font-sizeon the body element to have the whole page rendered at that font size—unless of course it has been explicitly defined elsewhere.