www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Why does an earlier CSS style "dominate" a style later on?

  1. #1
    Join Date
    Mar 2010
    Posts
    701

    resolved [RESOLVED] Why does an earlier CSS style "dominate" a style later on?

    In my CSS file, I have this:
    Code:
    #sidebar a{color:#105CB6;}
    ...
    tbody.datepickerDays td.datepickerSelected a{color:#fff;}
    How come the link is #105CB6, and not #fff? There's no !important.
    In Google Chrome's developer tools, "tbody.datepickerDays td.datepickerSelected a{color:#fff;}" shows up, but it's crossed out. Why is it?

  2. #2
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Seems like a specificity issue.

    See http://www.w3.org/TR/CSS21/cascade.html#specificity
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  3. #3
    Join Date
    Mar 2010
    Posts
    701
    Thanks, so #foo{} "cascades" .foo{}. I added an additional variable in front of my selector and solved it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles