Image

Javascript and CSS - hiding elements

Spent some time looking for this last night, but right now I have to get another function working.

When hiding elements with "inline" and "none", the script I normally use requires
style="display:inline;" in the element.


However, the elements I am hiding this time are HTML table cells. Having the style tag seems to mess up the way it draws on FIreFox.

Is there a way to switch classes and hide elements? Seems that if I use a class instead of style it draws nicely.

This is the code I have now, but it doesnt seem to work - but there are no JS errors.
document.getElementById(LayerName).className = "layershow";



Solution:
Even though we got the right code for using classes, ultimately I had to go back to the style tag because of browser draw issues. using the style tag on a nested div tag seems to work.