1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can I change the order rules are applied

Discussion in 'CSS' started by Forrest, Nov 1, 2007.

  1. #1
    Or is there another way to get this to work? On my blog, I have some text at the top of the sidebar with two links in it. I've given them a class to make the text stand out, but a.authorlink:visited is being overridden by #sidebar a:visited.

    Any advice?
     
    Forrest, Nov 1, 2007 IP
  2. briansol

    briansol Well-Known Member

    Messages:
    221
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    110
    #2
    put it later in the source, or put !important; after the rule, ala broder: 0 !important;
     
    briansol, Nov 3, 2007 IP
    Forrest likes this.
  3. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Don't use !important. Users like to use their own stylesheets at times and browser support is partial.

    Change the order they appear in the source.
     
    krt, Nov 3, 2007 IP
    Forrest likes this.
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Later in the css, OR you could make the special one you want more specific. LIke you have #sidebar.visited, and you could then have

    #sidebar a.authorlink:visited which is more specifically named than just a.authorlink:visited.
     
    Stomme poes, Nov 3, 2007 IP
    Forrest likes this.