HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Link color
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
MinatureCookie



Joined: 20 Mar 2006
Posts: 68

PostPosted: Tue Jun 13, 2006 11:17 am     Link color Reply with quote

I don't beleive I'm stuck on link colors! Embarassed Lol

Well, anyway, my problem is, when I go on a hover link, if it's been visited, the visited colour over-rides the hover color.
I take away the visited order, it works then, but the visited links look that ugly colour.

If that didn't make sense, here's my code.

Code:
<html>
<body bgcolor="#F0F8FF">
<center>
<img src="cpu.bmp"><BR>
<style type="text/css">
a:link {color: #000000; text-decoration: none;}
a:active {color: #000000; text-decoration: none;}
a:hover {color: #94B2D1; text-decoration: none;}
a:visited {color: #000000; text-decoration: none;}
</style>
<font size="-3"><font face="Arial"><a href="mailto:MinatureCookieatGMail.com" target="_blank">Contact Us</a> |
<a href="sponsor.html" target="_blank">Help advertise us</a> |
<a href="o-websites.html" target="_blank">Other Websites</a>
</center>
</body>
</html>
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Tue Jun 13, 2006 11:41 am     Reply with quote



First, remember styles go into the <head>, not the <body>. Second, since css is cascading, that is why the overwriting. You should use
Code:
a:link {color: #000000; text-decoration: none;}
a:visited {color: #000000; text-decoration: none;}
a:hover {color: #94B2D1; text-decoration: none;}
a:active {color: #000000; text-decoration: none;} 
This is the order. I remember this as Love - Hate Smile

_________________
Corey
Loud Info | Loud Worx | Merchant Account Blog
MinatureCookie



Joined: 20 Mar 2006
Posts: 68

PostPosted: Tue Jun 13, 2006 11:50 am     Reply with quote

Lol, so many times today I've been caught out by the most obvious things! Rolling Eyes

Thanks for the help.

(In IE, as I found out, even if you put the CSS in the body it works fine, FireFox isn't proving as good as it claims to be Sad )
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial