Menu
Hello,
I am using javascript to dynamically create a <p> within my HTML page. I have a separate style sheet setup to control the presentation of this element. This works fine in FireFox and Safari, but IE seems to ignore the styling. Is this an IE bug or am I doing something wrong? Is there a workaround?
Here is my code, triggered by a ‘change’ event on a <select> tag.
[CODE]var message = document.createElement(“p”);
message.setAttribute(“class”, “message”);
var theParent = this.parentNode;
var nextNode = this.nextSibling;
theParent.insertBefore(message, nextNode);
[CODE].message {
font-size: 0.8em;
color: #666;
}