Jump to content

PawelX

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About PawelX

  • Rank
    Newbie
  1. https://www.w3schools.com/css/css_specificity.asp There are two statements on that page that I can't wrap my head around: 1 "Equal specificity: the latest rule counts - If the same rule is written twice into the external style sheet, then the lower rule in the style sheet is closer to the element to be styled, and therefore will be applied: h1 {background-color: yellow;} h1 {background-color: red;}" In what sense is the rule "closer to the element"? It comes last (so it's logical that it overrides any previous rules with the same specificity), but I don't know in what
  2. https://www.w3schools.com/css/css_specificity.asp There are two statements on that page that I can't wrap my head around: 1 "Equal specificity: the latest rule counts - If the same rule is written twice into the external style sheet, then the lower rule in the style sheet is closer to the element to be styled, and therefore will be applied: h1 {background-color: yellow;}h1 {background-color: red;}" In what sense is the rule "closer to the element"? It comes last (so it's logical that it overrides any previous rules with the same specificity), but I don't know in what s
×
×
  • Create New...