Jump to content

mouseover simple question


user4fun

Recommended Posts

I cannot find an example for mouse over font changes with javascript? or shouldibeusing something elsei just need for fon to change color to red and lose the underlining when mouse is overthank you all

You can do this with JavaScript but you should use css for page appearance.
<html><head><style type="text/css">a:link {color: black;text-decoration: underline}a:visited {color: black;text-decoration: underline;}a:hover {color: red;text-decoration:none}a:active {color: red;text-decoration:none}</style></head><body><p><b><a href="#">This is a link</a></b></p></body></html>

Link to comment
Share on other sites

<code>Thank you so much for your help, and if you would be so kind to help me with one more questionI tried to change the original color to blue instead of black and it stoped working<body><style type="text/css">a:link {color: auto;text-decoration: underline}a:visited {color: auto;text-decoration: underline;}a:hover {color: red;text-decoration:bold}a:active {color: red;text-decoration:none}</style><p><b><a href="presult.htm"><font color="#0000CC">Result</font></a></b></p><p><b><a href="cal.htm">Cal</a></b></p></code>and i am also trying to limit that to the link on vertical bar just like the one on this site where it sayslearn htmllearn csslearn javascriptetcetcetc

Link to comment
Share on other sites

Link: http://www.w3schools.com/css/css_pseudo_classes.aspYou should use that as a reference.

a.main:link {color: blue;text-decoration: underline}a.main:visited {color: blue;text-decoration: underline;}a.main:hover  {color: blue;text-decoration: none;}

you need to apply the class property to the links like this:

<a class="main" href="#">Link Text</a>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...