Change background of a row OnMouseOver

If you want to have the entire row/block to change the background color OnMouseOver, follow the instruction below.

Step 1: Add 2 new classes in your style.css file. 1 class is “change_bg” which will behave when Mouse moved Over a row in a table. The other is “white_bg” which will behave when Mouse moved Out of that row.

Step 2: Add the following codes to a row in the table or a <div> that you want it to change the behavior.

<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”5″>
<tr onmouseover=”this.className=’change_bg'” onmouseout=”this.className=’white_bg'” >