After I appendChild() in ie6, do stylesheets apply to that element?
Posted
by rickharrison
on Stack Overflow
See other posts from Stack Overflow
or by rickharrison
Published on 2010-05-27T02:16:44Z
Indexed on
2010/05/27
2:21 UTC
Read the original article
Hit count: 243
I am creating some elements in javascript like so:
var parent = document.createElement('div');
parent.setAttribute('id', 'parent');
var child = document.createElement('div');
child.setAttribute('class', 'child');
parent.appendChild(child);
otherelement.appendChild(parent);
I have a stylesheet which has styles for #parent
and .child
. However, it appears the styles are being applied to the parent but not the child. Does ie6 only support styles on id's and not classes or am I doing something wrong?
© Stack Overflow or respective owner