|
| |
|
|
paulie
Posts: 558 Status: offline
|
Coding links - 6/12/2003 14:45:39
I have link attributes defined in my css thusly: A:link {text-decoration: none; color: orange;} A:hover {text-decoration: none; color: white;} A:visited {text-decoration: none; color: orange;} I notice that once a page has been visited, the hover attribute no longer functions, which seems logical given the rather limited options in the code. Is there a way to change that so the link always displays the hover color when moused over? I know this can be done with Javascript menus, but I rather like the simplicity of CSS for this purpose.
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Coding links - 6/12/2003 18:58:15
The correct order should be... LVHA a:link a:visited a:hover a:active If the a:active becomes before a:hover, the a:active rule will not work. Also, you could trim your above example to this... a{text-decoration:none;} a:link, a:visited{color:orange;background:none;} a:hover{color:white;background:none;} a:active{color:red;background:none;} (or whatever combination you are using) Anytime you specify a color, there should also be a background color whether it is an actual color, none, or transparent, you' ll need it to validate your CSS 100%. Also, adding a background color adds a little bit of flavor to your link text. ;) P.S. Everyone should start getting into the habit of using all lower case in their stylesheets and their html coding.
< Message edited by pageoneresults -- 6/12/2003 7:13:21 PM >
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
paulie
Posts: 558 Status: offline
|
RE: Coding links - 6/12/2003 20:17:10
Thanks. They seemed to be working fine in that order, but I' ll heed your advice nonetheless. Just curious about the case issue, is that due to browser compatibility, or just good coding standards?
|
|
|
|
Gil
Posts: 7533 From: North Carolina, USA Status: offline
|
RE: Coding links - 6/12/2003 21:29:29
quote:
Just curious about the case issue, is that due to browser compatibility, or just good coding standards? All programming was case sensitive until MS decided to destroy any semblance of logic. It’s 1. good coding standards and 2. as we all move to xml it will be required.
_____________________________
Gil Harvey, 1947-2004
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|