CSS Styles Not Applied, Specificity Issue
A CSS rule was written and is definitely being loaded (visible in dev tools), but it's not applied to elements because a more specific rule is overriding it. This commonly happens after refactoring style organization or adding utility classes.
The style appears in the stylesheet but browsers display the override style instead, confusing developers about what went wrong.
Error Messages You Might See
Common Causes
- Inline styles (style attribute) overriding all CSS rules
- !important used in override rule or in original rule creating conflict
- Selector specificity too low (element selector beaten by class selector)
- CSS order: newer rules loaded after intended rule, causing override
- ID selector in override causing extremely high specificity
How to Fix It
Inspect element in dev tools, examine cascade tab to see which rules apply/override. Increase selector specificity without !important if possible. Move your CSS after overriding CSS in load order. Use class selectors instead of element selectors for higher specificity. Avoid inline styles. Reserve !important for utilities only, never for component styles.
Real developers can help you.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get HelpFrequently Asked Questions
What's the CSS specificity order?
Inline > ID > Class/Pseudo-class > Element. Newer rules override older rules if same specificity. Use lowest specificity that works.
When should !important be used?
Almost never in component styles. Only use for utility/override classes (e.g., .hidden { display: none !important; }).
How to debug why a style doesn't apply?
Right-click element → Inspect. Look at Styles tab. Crossed-out rules are overridden. Click the rule to see which file it came from.