Style Not being applied in HTML event

  • Thread starter Thread starter Angel
  • Start date Start date
A

Angel

I have the following definition for a Table cell:

<TD class="clsMenuItem"
onmouseover="this.classname='clsMenuOver'"
onmouseout="this.classname='clsMenuItem'">WHATEVER</TD>


The class(Style) is being applied when I run the page but
the mouseover event is not being triggered because the
style is not being applied. Am I doing something wrong
here. I want the Table Cell to change color as I move my
mouse over it.

Thanks...
 
Hi Angel,

make sure that any below tags are specified in head section

<STYLE TYPE="text/css">
P {font-size: 24pt;}
.redText {color: red;}
.blueText {color: blue;}
.italicText {font-style: italic;}
</STYLE>


<LINK href="../styles/Styles.css" type="text/css"
rel="stylesheet">

And also try changing this statement
this.classname='clsMenuOver' to
this.className='clsMenuOver' because javascript may be
case sensitive.

Best Of Luck
Raja Balaji R
 
Back
Top