By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,322 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

changing background color of a cell

P: n/a
Sorry to ask this again. There has been quite a bit of post on this.

I have table with cells with the classes workspaces. The table has not
background color but onmouseover I changed the cell backgroundColor to
blue. I have to do something similar on mouseout to "remove" the blue
since my table is transparent, how do I accomplish that?

Thanks in advance.

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


ef*****@epitome.com.sg wrote:

I have table with cells with the classes workspaces. The table has not
background color but onmouseover I changed the cell backgroundColor to
blue. I have to do something similar on mouseout to "remove" the blue
since my table is transparent, how do I accomplish that?


How about setting
element.style.backgroundColor = 'transparent';
?
Or simply
element.style.backgroundColor = '';
if you want to remove the inline style setting. That will only work if
you did
element.style.backgroundColor = 'blue';
before, not if you set some style class or manipulated a rule in a
stylesheet.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.