#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    NYC
    Posts
    109
    Rep Power
    12

    A:link, A:hover, etc within CSS


    Not sure what this is referred to. I checked my dhtml book but its from 2000! I want to apply link, visited, hover, active to below code:

    Code:
    #print_category {
         position: absolute;
         left: 35%;
         top: 30%;
         font-size: 13px;
         text-align: left;
         line-height: 2 ;
         margin-right: 5em;
    		}
    Properties I want to apply:

    A:link {color: #000099;
    text-decoration: underline;
    }

    A:visited {color: #000099;
    text-decoration: none;
    }

    A:hover {color: #000099;
    text-decoration: none;
    }

    A:active {color: #000099;
    text-decoration: none;
    }

    How can this be done, Ive tried but to no avail:

    - A#print_category:active {color: #000099;
    text-decoration: none;
    }

    Thanks!
    Thanks.
    CRO8

    ________
    h o m e
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2001
    Location
    New Zealand
    Posts
    638
    Rep Power
    14
    try ::
    Code:
    a.#print_category:active {color: #000099;
    text-decoration: none;
    }
    From my own CSS::
    Code:
    a.xwin:link 	{ color: #000000; text-decoration:underline;}
    a.xwin:visited { color: #000000; text-decoration:underline;}
    a.xwin:hover 	{ color: #FFFFFF; }
    Where xwin is a DIV .....

    Z.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    NYC
    Posts
    109
    Rep Power
    12
    hey thanks- I tried the following code to no avail:

    Code:
    a.#print_category:link {color: #000099;
    text-decoration: underline;
    }
    
    a.#print_category:visited {color: #000099;
    text-decoration: underline;
    }
    
    a.#print_category:hover {color: #000099;
    text-decoration: none;
    }
    
    a.#print_category:active {color: #000099;
    text-decoration: none;
    }
    Any other variations?

    Thanks!
    Thanks.
    CRO8

    ________
    h o m e
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2001
    Location
    New Zealand
    Posts
    638
    Rep Power
    14
    Hmm the stuff I posted works for me ... try taking out the # perhaps ..... ???
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2001
    Location
    New Zealand
    Posts
    638
    Rep Power
    14
    I mean >>
    .print_category{ defs }

    + a.print_category:link { def }

    Btw ... just to be sure (as they say) you did flush your browse cache right? I spent a whole morning I long while ago (bonehead) changing all sorts of css stuff forgetting that reloading the page doesn't refresh the css (still cached) unless you have the appropriate settings

    Z.
  10. #6
  11. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,936
    Rep Power
    4033
    Try using this code:

    Code:
    #print_category a:link { 
       link code
    }
    
    #print_category a:visited {
       visited code.
    }
    That should make the link code only apply to links inside of whatever #print_category is.
    Recycle your old CD's, don't just trash them



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    NYC
    Posts
    109
    Rep Power
    12
    Thanks kicken- below is what I used but its still not seem to be working on page for retrieved results. . . but when I change rgb color of visited, the link colors do change, so its partially working.

    hhhmmmmmmmmmm. Any other ideas?

    Code:
    #print_category {
         position: absolute;
         left: 35%;
         top: 30%;
         font-size: 13px;
         text-align: left;
         line-height: 2;
         }
    
    #print_category a:link {color: #000000;
    text-decoration: underline;
    }
    
    #print_category a:visited {color: #000000;
    text-decoration: none;
    }
    
    #print_category a:hover {color: #000000;
    text-decoration: none;
    }
    
    #print_category a:active {color: #000000;
    text-decoration: none;
    }
    Thanks.
    CRO8

    ________
    h o m e
  14. #8
  15. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    save the linked css file as .css not .htm
    ie, greg8.htm --> greg8.css

    and remove all html tags from that.
    the style tags <style>
    and the html comment tags <!-- -->

    to make comments in a css-file use this formating
    /* comment */
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    NYC
    Posts
    109
    Rep Power
    12
    ok thanks Akh. Let me get to it later this evening. Appreciate your response

    . . . you know I was checking out zeldman's a list apart and saw how he did it:

    Code:
    #dailymenu	{left: 0; width: 138px;}
    #dwwsmenu	{left: 139px; width: 248px;}
    #glammenu	{left: 385px; width: 153px;}
    #classicsmenu {left: 538px; width: 97px;}
    #aboutmenu	{left: 634px; width: 67px;}
    
    #dwwsmenu a:hover {background: transparent url(/i04/nav.gif) -139px -30px no-repeat;}
    #glammenu a:hover {background: transparent url(/i04/nav.gif) -385px -30px no-repeat;}
    on the right track- looking fwd to hammering it out tonight.
    Last edited by CRO8; May 11th, 2004 at 09:24 AM.
    Thanks.
    CRO8

    ________
    h o m e
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    NYC
    Posts
    109
    Rep Power
    12
    just want to say all is good so far, figured out how to apply the css to the results- just begining to start posiitoning rest of page. my page

    thanks for help
    Thanks.
    CRO8

    ________
    h o m e

IMN logo majestic logo threadwatch logo seochat tools logo