Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8

Thread: Unvisit a Link

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    3
    Member #
    21666
    I am trying to code a pop-out navigation bar and the problem is that i have clicked all of the links and now i cant see the link hover.
    Code:
    #navcontainer a:hover {
    color:red;/*<not showing*/
    list-style-type: none;
    background-color: Silver;
    }
    #navcontainer a {
    color : orange;/*<not showing*/
    width : 100px;
    display : block;
    list-style-type : none;
    }
    #navcontainer a:visited {
    color : purple;/*<always showing*/
    list-style-type : none;
    }

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    Can you show us the URL to your site?
    I would like to see it using various browsers.


  4. #3
    Junior Member
    Join Date
    Apr 2010
    Posts
    3
    Member #
    21666
    I dont have a website to give you because i dont have one but i can give you the files(somehow)

  5. #4
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    Put them in this order. That will give you the hover.
    #navcontainer a {
    color : orange;/*not showing*/
    width : 100px;
    display : block;
    list-style-type : none;
    }
    #navcontainer a:visited {
    color : purple;/*always showing*/
    list-style-type : none;
    }
    #navcontainer a:hover {
    color:red;/*not showing*/
    list-style-type: none;
    background-color: Silver;
    }

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    Steve ... good one!
    Yes, they are processed in order.


  7. #6
    Junior Member
    Join Date
    Apr 2010
    Posts
    3
    Member #
    21666
    wow thanks good thing to know. is that always the case or only in this case. it half worked now though. I think i may have found the one thing (that ive heard of) that works in IE and not firefox. It works like magic in IE (i dont know which version. its the one that comes already on Windows 7). But in firefox (3.6.3) the orange color never shows up. I'm going to attach the whole zip file of files maybe that will help. (you will have to extract them to a separate folder because the html files don't have the css in them its only referenced.

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    CSS is read serially. The last property read is given the highest priority, if of the same level of specificity.

    You can, however, have earlier properties that take priority over later ones, e.g. in the case where you specify a class or id:

    a#idName {color: #ff0000}
    a.className {color: #00ff00}
    a {color: #0000ff}

    In this case, <a> will be blue, <a class="className"> will be green, and <a class="className" id="idName"> will be red.

    This is because ID selectors take the highest priority, class selectors next, and element selectors last.

    Hope this helps!

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    In particular, the algorithm used to determine specificity is relatively straightforward:

    • Any rule in a [minicode]style[/minicode] attribute has a value of 1000.
    • Ids count for 100.
    • Classes, attribute selectors, and pseudo-classes count for 10.
    • Element names and pseudo-elements (e.g., [minicode]:first-line[/minicode]) count for 1.


    You count up the number of each of those in a selector and add them up to get your specificity value.

    So [minicode]a:hover[/minicode] and [minicode]a.magic[/minicode] are both at a specificity of 11, while [minicode]a#magic.hover:active[/minicode] is at a specificity of 121.

    More examples in the section on calculating specificity in the CSS specification.


Remove Ads

Posting Permissions

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

Search tags for this page

ie unvisit link

,

unvisit links

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:28 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com