Go Back   Cyber Tech Help Support Forums > Software > Web Development & Graphic Design

Notices

Web Development & Graphic Design Problem Solving for Graphic Design, PHP, ASP, Perl, MySQL, SQL, XML, HTML issues

Reply
 
Topic Tools
  #1  
Old July 15th, 2002, 06:37 PM
Silver Rabbit's Avatar
Silver Rabbit Silver Rabbit is offline
Senior Member
 
Join Date: May 2002
Posts: 247
Color Change on Rollover.

Does anyone know the code to change the color of text when it is rolled over????

Thanx'
Reply With Quote
  #2  
Old July 15th, 2002, 07:07 PM
Steven.Bentley Steven.Bentley is offline
CTH Subscriber
 
Join Date: Nov 2000
Location: West Yorkshire, UK
Age: 45
Posts: 3,840
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
Reply With Quote
  #3  
Old July 15th, 2002, 08:01 PM
Silver Rabbit's Avatar
Silver Rabbit Silver Rabbit is offline
Senior Member
 
Join Date: May 2002
Posts: 247
Thanx'
Reply With Quote
  #4  
Old September 7th, 2002, 11:54 AM
Silver Rabbit's Avatar
Silver Rabbit Silver Rabbit is offline
Senior Member
 
Join Date: May 2002
Posts: 247
Can someone give me an example on how this would work, I can't get it going.

Thanx'
Reply With Quote
  #5  
Old September 7th, 2002, 07:37 PM
Steven.Bentley Steven.Bentley is offline
CTH Subscriber
 
Join Date: Nov 2000
Location: West Yorkshire, UK
Age: 45
Posts: 3,840
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>
Reply With Quote
  #6  
Old September 7th, 2002, 07:41 PM
Silver Rabbit's Avatar
Silver Rabbit Silver Rabbit is offline
Senior Member
 
Join Date: May 2002
Posts: 247
o, Thanx'
Reply With Quote
  #7  
Old September 23rd, 2002, 10:21 PM
degsy's Avatar
degsy degsy is offline
Cyber Tech Help Moderator
 
Join Date: Jul 2001
Location: North-East, UK
Posts: 22,475
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>
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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.