CSS Question

Discussion in 'Community Discussion' started by EricBrian, May 24, 2011.

  1. EricBrian macrumors 6502a

    EricBrian

    Joined:
    Jul 30, 2005
    #1
    In the attached image, you can see the css.

    On line 1546, the background-color is overridden by background-color on line 985. Can somebody explain why this is?

    css-question.png

    Shouldn't the background color specified on line 1546 win because it comes later in the css?

    Thanks.
     
  2. EricBrian thread starter macrumors 6502a

    EricBrian

    Joined:
    Jul 30, 2005
    #2
    Hmmm.... I guess I forgot to consider specificity calculations. Ok, got it now. :)
     
  3. Melrose Suspended

    Melrose

    Joined:
    Dec 12, 2007
    #3
    Specificity tricked me a whole lotta times early on... :D
     

Share This Page