Click to See Complete Forum and Search --> : divs and css trouble with Netscape


joasiar
04-14-2003, 03:03 PM
I am having trouble applying my external css to a div in Netscape. I have one div nested inside another. I am using document.write and vars to replace different content on a rollOver. The content changes, but all my styles are not being applied. It works fine with IE.

Does anyone have an answer?

Frustrated by Netscape,
Joanna Rejdych

khalidali63
04-14-2003, 03:28 PM
once the document.write is executed thne try to set the styles afterwards again on the object.something like
document.open();
document.write("<div id=\"temp\">Div</div>");
document.close();

now set the style class
var obj = document.getElementById("temp");

if(document.all){
obj.className = "className"
}else{
obj.setAttribute("class","className");
}

Hope this helps

Cheers

Khalid