External stylesheets do have the lowest priority and what you've read about CSS is correct, the problem is Firefox doesn't do cascade order correctly (which I was meant to refer to in the above) and I'm just so use to working with Firefox, that sometimes not relying on the browser to do what you want is better than relying on it. I never rely on browser default styling, every element I use within a document, I style how I want it to appear.
The reason why I do ul#unordered li is because it's more specific, anything that is more specific will have higher importances.
each element used is 1 point, each class is 10 points and each id is 100 points:
li = 1pt
ul li = 2pt
#unordered li = 101pt
ul#unordered li = 102pt
ul#unordered li#itemone = 202pt
So lets say I had
ul#unordered li { background-color: green; }
#unordered li { background-color: pink; }
ul#unordered li { background-color: blue; }
What background colour am I going to expect should show?
When an item has the same specifications, the last one that appeared would override the ones above it. We should expect background to be blue, if we took that out, we would expect green to show, even though the latter of styling for the same element does appear, the one using green is higher in importance because it's more specific.
Another reason is because it lets me know what type of element I'm working on and what that element is capable of doing, since not all elements accept every CSS styling.
Cheers,
MC
Comment/Reply (w/o sign-up)