specificity of style rule?

Hi Everyone,

I'm brand new to the list.

I wonder: is there a way to know the specificity of a cssRule? Can I
get some number representing the weight?
Example:

<style>
#foo {

}

p {

}
</style>
<script>
var cssRules = document.styleSheets[0].cssRules;


if(cssRules[0].weight > cssRules[1].weight) {

}
<script>

--
http://dhtmlkitchen.com/

Received on Thursday, 1 December 2005 19:03:29 UTC