faqts

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 10 people (50%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Is it possible to change the color of the text inside the <td> when mouse over the cell?

May 12th, 2008 20:44
i can do it, Jason Ross, Ruel Dizon,


yes. the easiest way is to use css. sample code follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
// This sets the font color during the mouseover
.on {
	color: #CC0000;
}
// This returns the font back to the normal color on mouseout
.off {
	color: #000000;
}
-->
</style>
</head>
<body text="#000000" bgcolor="#FFFFFF">
<table width="90%" border="1" cellspacing="1" cellpadding="1">
   <tr>
      <td onMouseOver="this.className='on'" 
onMouseOut="this.className='off'">This is some text</td>
   </tr>
   <tr>
      <td onMouseOver="this.className='on'" 
onMouseOut="this.className='off'">This is some other text</td>
   </tr>
</table>
</body>
</html>
http://www.stupidarticles.com
http://www.halazona.com
http://www.shikapika.com
http://www.stakoza.com
http://www.uploadarticles.com
http://www.ganazat.com
http://www.damima.com
http://www.tarabiza.com
http://www.articlesxarticles.com
http://www.articlesfreedirectory.com