|
Web Development & Graphic Design Problem Solving for Graphic Design, PHP, ASP, Perl, MySQL, SQL, XML, HTML issues |
|
Topic Tools |
#1
|
||||
|
||||
Color Change on Rollover.
Does anyone know the code to change the color of text when it is rolled over????
Thanx' |
#2
|
|||
|
|||
Make it into a link (doesn't have to point anywhere), and use CSS in the head section
a {color:black} a:hover {color:green} black usually, green when rolled over |
#3
|
||||
|
||||
Thanx'
|
#4
|
||||
|
||||
Can someone give me an example on how this would work, I can't get it going.
Thanx' |
#5
|
|||
|
|||
A simple link in the body section...
<a class="changecolour" href="">This is some text that will change colour</a> then in the head section <style> a.changecolour{color:red;text-decoration:none} a.changecolour:hover{color:green;text-decoration:none} </style> |
#6
|
||||
|
||||
o, Thanx'
|
#7
|
||||
|
||||
You can also do it using javascript
<html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script> function changeColor(el,newColor) { el.style.color = newColor; } </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <p onmouseover="changeColor(this,'#ff00ff')">Text</p> <span onmouseover="changeColor(this,'red')">Text </span> </body> </html> |
Bookmarks |
«
Previous Topic
|
Next Topic
»
|
|
Similar Topics | ||||
Topic | Topic Starter | Forum | Replies | Last Post |
Can't change color scheme? | dontbreakme | Windows Vista | 3 | June 1st, 2008 12:43 PM |
How Can I Change Color to B&W? | Brainscan701 | Web Development & Graphic Design | 3 | June 4th, 2007 02:25 AM |
Text change on rollover | abutler33 | Web Development & Graphic Design | 2 | September 15th, 2006 04:29 AM |
is there a way to change the bottom bar color? | PhoenixBlue | Windows XP | 1 | July 17th, 2006 07:42 PM |
change pdf color | visualuser | Applications | 0 | November 15th, 2004 04:00 PM |
All times are GMT +1. The time now is 09:43 PM.