How do I make an element appear with javascript without overriding style?
I have the following code to display a div that was previously hidden:

    document.getElementById('theDiv').style.display = 'block';

The problem is that when I execute this, the div loses all prior CSS formatting. Is there a way that I can have this same functionality while keeping my CSS formatting? 
How do I make an element appear with javascript without overriding style?
===

I have the following code to display a div that was previously hidden:

    document.getElementById('theDiv').style.display = 'block';

The problem is that when I execute this, the div loses all prior CSS formatting. Is there a way that I can have this same functionality while keeping my CSS formatting? 