I have a site that creates new divs in real time (using JS).
The class of each div is "conv".
My problem is, that the css rules that I have written for this class doesn't apply to the new divs.
conv.length is the length of the xml file I am using.
The JS:
for(i=0; i<conv.length;i++){
var div= document.createElement("div");
div.id="conv"+i;
div.class= "conv";
div.innerHTML=conv[i].childNodes[0].nodeValue;
div.style.height="50px";
div.style.overflow="hidden";
document.getElementById("conv").appendChild(div);
}
The CSS:
.conv {
background-color:#CCC;
}