So I'm trying to build a website with a menu that's in a transparent div on pageload, and switches to a more visible style on mouseover. I got the div on an opacity 25 by default, and it switches to 75 on mouseover, yet it doesn't seem to jump back to 25 when the mouse leaves the div. Anyone got any idea what I'm doing wrong? CSS:
div.transON {width: 100%; background-color: silver;opacity:.75;filter: alpha(opacity=75); -moz-opacity: 0.75;border:1px solid black; }div.transOFF {width: 100%; background-color: silver;opacity:.25;filter: alpha(opacity=25); -moz-opacity: 0.25;border:1px solid black; }
HTML: <div class="transOFF" onmouseover="this.className='transON'" onmousout="this.className='transOFF'"><p style="padding:5px;width:75%;">This div should be transparent, until you move your mouse over it.</p></div>