Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthornaveen
    • CommentTimeMay 22nd 2006
     permalink
    hi...
    I have a code for li a :link, li a:hover and lia:visited .the code is give n below. if I click on a link it will become visited link and after that a:hover is not working.pls help.

    /* css code */
    .popmenu {
    width: 150px;
    border: 1px solid #98cef5;
    }
    .popmenu ul {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    line-height: 15px;
    margin: 0px;
    padding: 0px;
    }

    .popupmenu li {
    list-style-type: none;
    display: block;
    height: 20px;
    vertical-align: middle;
    padding-top: 5px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 5px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    text-decoration: none;
    }
    .popmenu li a:link{

    background-color: #e8e8e8;
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #98cef5;

    color: #172c3a;
    }
    .popmenu li a:hover{
    background-color: #4c94c7;
    color: #FFFFFF;
    }
    .popmenu li a:visited{
    list-style-type: none;
    display: block;
    height: 20px;
    vertical-align: middle;
    padding-top: 5px;
    background-color: #e8e8e8;
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #98cef5;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 5px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: bold;
    text-decoration: none;
    color: #172c3a;
    }
    /* end css code */
    /* html code */

    */ end html */
  1.  permalink
    Try putting your a:hover styles after the a:visited styles. The order matters when defining the pseudo-selectors. Always try to have them in the following order in your code:
    a:link { }
    a:visited { }
    a:hover { }
    a:active { }

    I think there is an a:focus too that should go in there somewhere after link and visited, if you need to use it. I don't THINK it works on IE though (just a hunch).
    •  
      CommentAuthornifkin
    • CommentTimeMay 23rd 2006
     permalink
    Best bet for sorting order on link styles: Lord Vader's Former Handle Anakin (:link, :visited, :focus, :hover, :active)
  2.  permalink
    (or Love Hate)
Add your comments
    Username Password
  • Format comments as (Help)