Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML question

Status
Not open for further replies.

syakovis

Programmer
Aug 2, 2001
6
AU
What am I doing wrong here ??? Why when I load this page the cell with class=".classSelected" is not selected ??? I know this is a very easy problem but i can't find why it is doing it.

<html>
<HEAD>
<title>TEST</title>
<STYLE>
.classNormal
{
color: black;
background-color : yellow;
}
.classSelected
{
color: white;
background-color : red;
}
</STYLE>

</HEAD>

<BODY>

<br><br><br><br><br>

<center>

<table width=&quot;10%&quot; BORDER='1' cellspacing='0' cellpadding='6'>
<tr>
<td class=&quot;.classNormal&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>
NORMAL
</td>
<td class=&quot;.classSelected&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>
SELECTED
</td>
</tr>
<tr>
<td class=&quot;.classNormal&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>
XYZ
</td>
<td class=&quot;.classNormal&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>
2
</td>
</tr>
</table>

</center>

</body>
</html>
 
CSS question actually.

It has to be
<td class=&quot;classNormal&quot; etc....
insted of what you use
<td class=&quot;.classNormal&quot; etc....

D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top