CSS Styling and Selectors
Selectors, specificity, colours, backgrounds, fonts, shapes and transitions, and why a rule you wrote is ignored or overridden by another one.
Threads in CSS Styling and Selectors
- ✓
Why is my CSS rule ignored? How does specificity decide which rule wins?
When two rules set the same property on one element, the browser scores each selector and the higher score wins. An id counts most, then classes, attributes...
1reply