?
Solved

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

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

Cheers,
Rick
0
Comment
Question by:richardsimnett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:kiranghag
ID: 11978726
0
 
LVL 36

Accepted Solution

by:
Zyloch earned 800 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

764 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