Question:
How do you change the color on a hyperlinked text?
anonymous
2009-10-26 08:57:18 UTC
http://www.acnenomore.com/affiliateresources/index.htm

If you take a look at the above webpage, the internal links are blue. But when you just put your mouse cursor over it... then it goes red.

How do they do that?

I know how to make basic static websites using Frontpage but it doesnt have that hyperlink color change feature anywhere. I want to learn Dreamweaver but not sure if the program does that function.

Can anyone shed some light on how I can do this?
Six answers:
?
2009-10-26 09:12:41 UTC
The effect that you are seeing is called a rollover. Each link referes to a Javascript called sectionnavlinks (filename: sectionnavlinks.js). In the javascript file it calls a function to change the color of the link most likely based on the following function calls "onMouseOver "style="color:Red", onMouseOut style="color:Blue"".



You can open up sectionnavlinks.js in notepad and modify that onMouseOver section to show the colors that you want or if you want to get rid of it:



To undo this this:



1) Remove the reference to the class "sectionnavlinks" from your links:


href="sales-letter.htm">Mini Sales Letters




2) Edit the Body Tag:



Attributes for

TEXT = color expression

ALINK = color expression (Active Link)

LINK = color expression (Link Color)

VLINK = color expression (Visited Link)



Check out the following Website for some Tutorials:

http://www.htmlgoodies.com/
R.F.
2009-10-26 16:36:34 UTC
All the above solutions will work, but they are all not recommended for 2 big reasons.



First, if you put the color code into every link, that means when you want to change it, you will have to change it for every link on all your pages. So if you want a link color to be the same throughout the page, it's better to declare it once at the beginning of the page so you need to change it only once.



Mark's solution of putting it in the tag will work, but that leads to the 2nd reason why it shouldn't be done this way. If you really want to be standards compliant, the proper way to do it is to completely separate all your styles and formatting out of your HTML markup and put it in your CSS code.



So this is what you do in your CSS style at the top of your HTML page in the element:





The "a" style is the color for all your links.

The "a:hover" style is the color for links when you mouseover it.

You can also use "a:visited" for links that you've already visited, and "a:link" for unvisited links.



And Frontpage and Dreamweaver should both be able to do it because they have code mode which you can and should be using. If you are really interested in building web sites, you should learn proper web design--use tools like Dreamweaver to help you create your design; don't depend on them to do the thinking for you. And I would say to stop using Frontpage because it creates really bloated and non-standard code.
AJ
2009-10-26 16:01:37 UTC
That is a mouse over effect and I am pretty sure that is in Front Page but it is a while since I used it. Dreamweaver certainly has that functionality



AJ
RunrigFan
2009-10-26 16:07:43 UTC
Usually it's by a special html code, think colour changer or something.



Far too technical but heres a site that may help



http://www.htmlgoodies.com/tutorials/colors/article.php/3479011



http://www.htmlbasix.com/mouseover.shtml



Hope that helps
VIKAS
2009-10-26 16:13:18 UTC
Try this code

change the background color with onMouseover

... save save as Test.html and open in IE or Firefox (remember to turn on ActiveX)













New Document













Move the cursor to the color you want ...

Red




Orange




Yellow




Green




Magenta




Purple





This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...