navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Coding links

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Coding links
Page: [1]
 
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.
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Coding links - 6/12/2003 17:12:11   
They' re in the wrong order... should be (if I remember correctly)

Link
Visited
Active
Hover

Put them in this order and it should work :)

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to paulie)
paulie

 

Posts: 558
Status: offline

 
RE: Coding links - 6/12/2003 17:54:31   
Bobby, a thousand thank-you' s. You must not have had too many djinn & tunics, because you remembered the sequence correctly. :)I didn' t realize they needed to be in a specific order, and I was absent the Active one.
It' s working beautifully now, and I can go fix two other websites with the same problem! :)

(in reply to paulie)
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

(in reply to paulie)
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?

(in reply to paulie)
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

(in reply to paulie)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Coding links - 6/13/2003 11:16:54   
quote:

The correct order should be...


Thanks for the correction POR!

:)

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to paulie)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Coding links
Page: [1]
Jump to: 1





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