Link to home
Start Free TrialLog in
Avatar of Oli2
Oli2

asked on

JavaScript

I need to know how to change the Font Style of a Link in the MouseOver Event.
I know how to do this with graphics, but not with Text.

Avatar of seahpc
seahpc

Try using Stylesheets for that :


<style type="text/css">
<!--
 A:link    { COLOR: #0000FF; TEXT-DECORATION: underline; font-weight: normal }

 A:visited { COLOR: #FF0000; TEXT-DECORATION: underline; font-weight: normal }

 A:active  { COLOR: #0000FF; TEXT-DECORATION: none }

 A:hover   { COLOR: #000000; TEXT-DECORATION: none; font-weight: Bold}
-->
</style>

Avatar of Oli2

ASKER

Sorry, seahpc, but I allready tried that. It doesn't work. At least with Netscape 4.05 it doesn't.
Here's my test:


<HTML>
<style type="text/css">
    <!--
     A:link    { COLOR: #0000FF; TEXT-DECORATION: underline; font-weight: normal }

     A:visited { COLOR: #FF0000; TEXT-DECORATION: underline; font-weight: normal }

     A:active  { COLOR: #0000FF; TEXT-DECORATION: none }

     A:hover   { COLOR: #000000; TEXT-DECORATION: none; font-weight: Bold}
    -->
    </style>
<BODY>
<A HREF="bla.html">Bla</A>
</BODY>
</HTML>

doesn't work.

Greetings, Oli

ASKER CERTIFIED SOLUTION
Avatar of cheekycj
cheekycj
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW- the code is on the second page :)

CJ
Avatar of Oli2

ASKER

Thanx cheeky, I think it'll fit my needs.
your welcome :)


CJ