Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS specificity war

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #157849
    blaja
    Participant

    http://codepen.io/anon/pen/Grxuq

    Why p wins, class is 10-points and element selector 1-point ?

    #157861
    magicspon
    Participant

    p wins because you have styled the p… if the p had not been styled then the p would inherit the style from it’s parent element, that being .foo

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.