Web Hosting Talk







View Full Version : What is the code to make a link change colors when the mouse is over it?


l45tor
02-22-2003, 10:17 PM
My links are black but I want them to change colors to like white or something when the mouse is brought over them.

Can anyone please help -- I need the code that when the mouse is over a link it allows u to make the link change colors

Any help will be greatly appreacited,
Lee Ruiz

stlmex1@yahoo.com

Also thanks to everyone who helped me in my DW question

Lippy
02-22-2003, 10:44 PM
the proper code if you are using Style Sheets would be.



A:link {
color: #0000FF;text-decoration: underline
}


A:active {
color: #0000FF;text-decoration: underline
}


A:visited {
color: #0000FF;text-decoration: underline
}


A:hover {
color: #0000FF;text-decoration: underline
}


Changing the color codes to the ones you wish to use. Hope this helps.

l45tor
02-22-2003, 10:54 PM
Thanks Lippy that helped out a lot

just two questions

I dont want the link to chang colors when they would go back to the site (like a visited link) I just want it to change colors when it is over the certain link or clicked -- so what would i use for that --

this--

A:link {
color: #0000FF;text-decoration: underline
}


A:hover {
color: #0000FF;text-decoration: underline

?????

Also I am doin this in DW - not sure what u mean style sheets -- so where should i place this - in the head section??

Thanks so much

Lee Ruiz
stlmex1@yahooo.com

ATST
02-22-2003, 11:42 PM
No. Copy the code lippy posted. Then do like he said, change the colors to what you want.
To not have a link change to a different color when it becomes visited, simply make 'visited' the same color as 'link'.

DW doesn't have style sheets?
Well anyway, yes, you place this in the head of the page.