Solved

how do I make a href change colors when the cursor is over it  using style sheets?

Posted on 2004-09-03
4
185 Views
Last Modified: 2012-06-27
Can anyone tell me how to do this?

Cheers,
Rick
0
Comment
Question by:richardsimnett
  • 2
4 Comments
 
LVL 10

Expert Comment

by:kiranghag
ID: 11978726
0
 
LVL 36

Accepted Solution

by:
Zyloch earned 200 total points
ID: 11978764
Hi

Basically, you do this:

<html>
<head>
<style type="text/css">
a:link {color:blue;}
a:hover {color:red;}   /*This is when mouse is over link*/
</style>
</head>
<body>
<a href="http://www.google.com/">Google</a>
</body>
</html>

Regards,
Zyloch
0
 

Author Comment

by:richardsimnett
ID: 11978846
Zyloch,
   Ok, that works almost perfectly. Problem is how to make it stay blue as the link color after it has been clicked....

Cheers,
Rick
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11978900
a:visited {color:blue;}
a:active {color:blue;}
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question