Help - Search - Members - Calendar
Full Version: change bgcolor of td when onmouseover
HTMLHelp Forums > Web Authoring > General Web Design
dharma
Hi, dear friends.
Im here again with a next maybe dumb question... biggrin.gif

Well, i like to ask:
if i want to change the background color of the cell in the table when onmouseover
will i need a special javascript, or there is something what browsers already know (like onclick="java script:window.open)?

where can i find some examples?

Thank You much
Effovex
You can put this in your styelsheet:

td:hover { background-color: #123456; }

however, internet explorer 6 doesn't support :hover on non-link elements, IIRC, so you'll need javascript anyway.

I think onmouseover="this.style.background='black';" and onmouseout="this.style.background='white';" will do in most browsers, as long as javascript is enabled.
dharma
thanx much wink.gif
i will use the this.style
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.