> No ambiguity at all, imho. Both selectors have the same specificity. > Both target the same element: a p that is a descendant of a div (this > can be div p or div div p or div div div p). Descendant is the > keyword here. > The second selector wins, because it comes last in the stylesheet. > CSS does not take your proximity into account. <snip/> > What you probably should do is using child selectors (selector1>p, > selector2>p,.... or any combination [1]). This doesn't work in IE 6, > as you know. > Or, you can tag your p with a class.
Thanks Philippe for confirming that. Not sure where I picked up the idea that proximity was a factor in calculating specificity, but I rechecked the specs, and there's no mention of it there for sure. The child selector is exactly what I need of course, and as that's not feasible (I have to support IE6) I need to back out of this and add some more classes into my markup. Its a case of premature optimization I think .. trying to do to much with too little.. plus it reminds me that anytime you have to look hard at specificity, you know you've created a maintenance nightmare for the guy that picks up that code after you. Sam ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/