Copy link to clipboard
Copied
Why when I select a div I give a class and id to, then select my css under source, why is the selector showing the id instead of the class. Shouldn't it be showing the class in order for me to make changes in css?
to complete what said Nancy, just take a look there, we call that Specificity
Copy link to clipboard
Copied
ID has priority because it's unique to the page.
Class carries less importance.
What are you trying to do?
Copy link to clipboard
Copied
to complete what said Nancy, just take a look there, we call that Specificity
Copy link to clipboard
Copied
Let's tie this in with the latest Star Wars hype!
PS the latest movie is really as bad as people are saying. Bombing a dreadnought in a no-gravity environment? And have they never heard of cruise missiles in the SW universe? Based on the self-destruct mission by one of the last tactical minds left in the rebellion (why is the general going down in her ship, when a droid could have sufficed, or perhaps have it remotely controlled?) a couple of cheap cruise missiles with installed hyper drives could pretty much destroy any opponent's ship at almost any size!
Sigh.
Copy link to clipboard
Copied
rayek.elfin wrote
Let's tie this in with the latest Star Wars hype!
PS the latest movie is really as bad as people are saying. Bombing a dreadnought in a no-gravity environment? And have they never heard of cruise missiles in the SW universe? Based on the self-destruct mission by one of the last tactical minds left in the rebellion (why is the general going down in her ship, when a droid could have sufficed, or perhaps have it remotely controlled?) a couple of cheap cruise missiles with installed hyper drives could pretty much destroy any opponent's ship at almost any size!
Sigh.
Huh? What in the universe has any of this to do with CSS IDs and Classes?
Copy link to clipboard
Copied
The chart expands on your answer. It's meant as a fun way to explain CSS specificity. The emperor represents an #ID selector, who is stronger in the force (specificity) than Darth Vader.
Too bad no-one expanded this chart with inline/external css rules and the !important statement. An inline !important CSS rule would be akin to the Death Star.
Copy link to clipboard
Copied
Oh, I see (sort of) .
Copy link to clipboard
Copied
wow
Copy link to clipboard
Copied
May CSS be with you