View Full Version : link color
tom o
03-05-2000, 08:09 AM
How can I make a link change color when the mouse is on it?
Owen_MC_Evans
03-05-2000, 12:40 PM
There are two main ways to change the color of the link on is a java-script onMouseOver command but I would advise the other which uses Cascading Style Sheets. to do this:
a) place a
<style type="text/css">
<!--
-->
</style>
tag just before the </head> tag
in this you can then place style information.
b) to add style information for links use an
"a" selector as shown
a { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #330000;}
this sets all links to a certain font:Arial size: 10 points and color: #330000 (a deep red)
to get the color to change when a mouse is moved over a new style class of a:hover can be added as such
a:hover { color: #FF6600}
as such all links change to: #FF6600 (orange) when a mouse is move over them.
BINGO
final script should look something like
<style type="text/css">
<!--
a { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #330000; text-decoration: none}
td.TitleLinks { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; text-transform: none; color: #FFFFFF; text-decoration: none }
a:hover { color: #FF6600}
a:active { color: #000000}
-->
</style>
There is a lot more that CSS can do see http://www.webreview.com/wr/pub/Style_Sheets for a bit more info
tom o
03-05-2000, 03:39 PM
damn that's sweet. thanks. can I heard of CSS before, but never really tried it. Now I see why it's such a big deal!
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.