+ 1
Which selector would win?
Does a chained selector have a higher specificity than a class or ID selector? For example, which selector would win: .special or h1.special or #special?
3 Respuestas
+ 8
If multiple selectors target on the same element, the result would based on specificity and the rule order.
Don't forget there's a reason it's called Cascading Style Sheets, anything come after will override the previous one. 😉
More info on specificity:-
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
+ 3
Glad you find it useful, you're welcome! 😄
+ 1
Thank you very much for your help👍😆