Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reset (clear) bgcolor of a table element

Posted on 2012-03-14
2
Medium Priority
?
313 Views
Last Modified: 2012-03-14
To set the bgcolor of a table cell element using  Java, I can use:
       document.getElementById('td_id').style.backgroundColor='#FF0000';
How do I reset, clear or remove the bgcolor so that the body bgcolor shows in the cell?  

I know I can set the cell's bgcolor to the same as the body but I want to avoid having to change the Java code if I change the body bgcolor.
0
Comment
Question by:thenelson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 2000 total points
ID: 37720832
document.getElementById('td_id').style.backgroundColor='transparent';



Cd&
0
 
LVL 39

Author Closing Comment

by:thenelson
ID: 37721008
I knew it was simple. Thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question