Solved

how do i change the color onmouseover & out of links

Posted on 1998-06-19
14
185 Views
Last Modified: 2010-04-09
How can i make it so when someone's mouse is over a link it would be one color and another when the mouse is not over?
0
Comment
Question by:Acocite
  • 6
  • 5
  • 2
  • +1
14 Comments
 
LVL 2

Expert Comment

by:tpryor
Comment Utility
javascript.

for instance,

>>store an image of the color to turn to (when mouse over) in a image var, ex:

 <SCRIPT LANGUAGE="JavaScript">

  <!-- HIDE

var menu = new Image();

        menu.src = "../gifs/mainmenu.gif";

 //STOP HIDING-->

>>name your image tag, ex:

<IMG SRC="../gifs/mainmenu.gif" NAME="Mainmenu" WIDTH="295" HEIGHT="405" ALIGN="BOTTOM">

>> include this code in the anchor tag..

<A HREF="bikes.htm" onMouseOver="Mainmenu.src='../gifs/mainmen1.gif';return showStatus(' ')"
onMouseOut="Mainmenu.src='../gifs/mainmenu.gif'">
-- Place above code here --
</a>

That's it.

GL
t

0
 

Author Comment

by:Acocite
Comment Utility
Yes, but how can i do it with text, instead of images? worth an extra 50 pts.
0
 
LVL 1

Expert Comment

by:treyjeff
Comment Utility
Like a link?  I have links on my page that change color when the mouse moves over them.  It might be able to be used with text, I'll try to test it.
0
 

Author Comment

by:Acocite
Comment Utility
Yeah, like a link.
0
 
LVL 1

Expert Comment

by:treyjeff
Comment Utility
Reject the propsed answer and I'll answer with what I use on my homepage.
0
 

Author Comment

by:Acocite
Comment Utility
first answer rejected
0
 
LVL 6

Expert Comment

by:Holger101497
Comment Utility
I can reliably tell you that it is NOT possible to change the color of "normal" text links without using DHTML / CSS. It can't be done in browsers other than Netscape 4 / IE 4 but the solutions are fairly different for the two and it's a real pain!
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Expert Comment

by:treyjeff
Comment Utility
Here is how you do it:

<a href="destination.htm"><font face="Verdana" color="#000000" onmouseover="this.style.color = '#ffffff'" onmouseout="this.style.color = '#000000'">Destination Pages</font></a>

This will make a link called Destination Pages that will go to destination.htm  Link will be black and then white when the mouse moves over the link.  I use this on my page.
0
 

Author Comment

by:Acocite
Comment Utility
I've tried using the text you gave me Treyjeff but it just doesn't work. Could their be some other tag somewhere in your document that i might need to make it work?
0
 
LVL 1

Expert Comment

by:treyjeff
Comment Utility
What browser are you using?
0
 

Author Comment

by:Acocite
Comment Utility
How am i supposed to use "Dhtml/Css"?
0
 

Author Comment

by:Acocite
Comment Utility
ie 4.0
0
 
LVL 1

Accepted Solution

by:
treyjeff earned 190 total points
Comment Utility
With what I gave you, you don't need DHTML or CSS.  I have uploaded a sample for you at http://www.huron.net/~jlewis/sample.htm
Check it out and it will work for you.
0
 
LVL 6

Expert Comment

by:Holger101497
Comment Utility
> With what I gave you, you don't need DHTML or CSS
Do you even know what these terms mean? CSS= Cascading STYLE sheets.

What would you call onmouseover="this.style.color = '#ffffff'" ?

btw. your uploaded example doesn't work in Netscape.
Kind of what I said: The solution is a pain, and different for the two browsers! I regret not having enough time right now to play around and find a way to make it work in both browsers...

Good luck anyway! :-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Make bootstrap pagination vertical 3 40
jquery not selector with class selector 3 29
Flexbox in CSS3 2 25
Bootstap Icons 3 17
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now