Mouseover

Denmark 3's picture

They have: 881 posts

Joined: Feb 2000

Hey, I used to remember how to do this but now I forget. How do I make a mouseover so it will change the color of the link when the mouse goes over it? Thanks, a lot.

AndyB's picture

They have: 344 posts

Joined: Aug 1999

For example ... in the HEAD of the document:

They have: 117 posts

Joined: Feb 2000

Parker,

You can try something like this. However, I don't think it will work with NS, just IE.

a.nav:link {color:blue}
a.nav:hover {color:red}
a.nav:active {color:blue}

Some Link

Bob

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi Parker,

For IE there are a number of tried & true methods, including css:

...by defining a class

.over { color:red;text-decoration:underline; ...etc...}
.out { color:blue; text-decoration:none;.....}

Some Page

or within the tag itself:

Some Page

For netscape, however, it appears as though the above css will only get fired with an onClick, not a mouseover/out. In fact, I cannot get netscape do it with a mouseover regardless of whether I use classes, ids, or tags and styles (even netscape's proprietary one --type='text/javascript') or javascript and the DOM. At best, I have been able to set the initial color with a style sheet, but not change it.
You might want to go to the Netscape site and see if there is a solution there.
Sorry Sad

Vinny

Where the world once stood
the blades of grass cut me still

Denmark 3's picture

They have: 881 posts

Joined: Feb 2000

How do I tell it no underline on the link?

AndyB's picture

They have: 344 posts

Joined: Aug 1999

Again, just for example ...

none; }
A:link { color:#0000ff; font-weight:normal; }
A:visited { color:#0000ff; }
A:active { color:#0000ff; }
A:hover { color:#ff0000; }
//-->

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.