Skip to content Skip to sidebar Skip to footer

Css Styles Overridden - Selector Not Specific Enough?

Styles from a CSS class are not applied (overridden by other selector). How can I fix it? HTML:

Solution 2:

Use !important directive. For example

.appearing {color: navy !important;}

The !important rule is a way to make your CSS cascade but also have the rules you feel are most crucial always be applied. A rule that has the !important property will always be applied no matter where that rule appears in the CSS document. So if you wanted to make sure that a property always applied, you would add the !important property. However, this is absolutely a last resort. It is better to create your styles in more structured way.

Post a Comment for "Css Styles Overridden - Selector Not Specific Enough?"