Javascript and CSS - hiding elements

    Date: 11/28/05 (Javascript Community)    Keywords: browser, html

    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.

    Source: http://www.livejournal.com/community/javascript/84716.html

« Counting Charcters follow up || Someone help out a newbie??? »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home