Solved

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

Posted on 2004-09-03
4
188 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
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…

688 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