2

Anyone have an idea? why my css is disabled and strikethrough

enter image description here

kukkuz
  • 41,512
  • 6
  • 59
  • 95
woyman 1
  • 49
  • 1
  • 7

3 Answers3

1

CSS values can be overwritten based on their specificity:

Specificity is a weight that is applied to a given CSS declaration, determined by the number of each selector type in the matching selector. When multiple declarations have equal specificity, the last declaration found in the CSS is applied to the element. Specificity only applies when the same element is targeted by multiple declarations. As per CSS rules, directly targeted elements will always take precedence over rules which an element inherits from its ancestor.

JBallin
  • 8,481
  • 4
  • 46
  • 51
1

Because margin is overwritten in the @media (max-width) query and padding is overwritten in section#intro

WofWca
  • 571
  • 3
  • 11
1

because you are more specific here about the element enter image description here

and you have written the above property after this enter image description here

always the latest written css peoperty and value will be picked by the browser

now. you either be more specific or use !important property