Universal selectors, combinators (>, +, etc.) and negation pseudo-classes :not() have no affect on CSS specificity; the styles defined inside of the :not() pseudo-class do.
Inline styles (styles added to an HTML element) always override any styles declared in an external style sheet; these are generally not good practice as it’s best to define all of your styles in one place.
!important overrides all other defined styles; this is bad practice as it can make debugging CSS much more difficult. When two conflicting styles make use of an !important declaration, the most specific style wins.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok