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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onMouseOut transparent background

Status
Not open for further replies.

bardley

Programmer
May 8, 2001
121
US
Hey guys and gals.

I have a table with a really cool background image. Each row is a menu button. I already have the cells highlight onMouseOver, but I need to know how to get the cell back to transparent onMouseOut. I'm familiar with the standard onMouseOut="this.style.backgroundColor = #AAAAAA" type thing, but how do I get the bg clear so that the table's background graphic shows through again?

Brad Gunsalus
bardley90@hotmail.com
 
Isn't it funny how 5 minutes after you make a post you keep playing with it and find the answer?? haha

In case anyone is interested, the answer I found is:

onMouseOut="this.style.background = false"

That seems to clear out any background you previously assigned to that cell.

Brad Gunsalus
bardley90@hotmail.com
 
paste this little sample, it should be what you're looking for (except I used a button for the example)
Code:
<HTML>
<HEAD>
<BODY bgcolor='#ff0000'>
<FORM NAME=&quot;blahForm&quot;>
<input type=button style='background-color:#00ff00;' onmouseover='this.style.backgroundColor=&quot;#0000ff&quot;' onmouseout='this.style.backgroundColor=&quot;transparent&quot;' value='Click Me'>
</FORM>
</BODY>
</HTML>

-kaht

banghead.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top