If I set
o.style.width or o.style.height
before setting o.style.position, position does not work!!!!!!!
o.style.width='auto';
o.style.position='absolute'; # It is not working!!!!!
o.style.left="100px";
o.style.top="100px";
But, if the set position first,
o.style.position='absolute'; # Everything all right
o.style.width='auto';
o.style.left="100px";
o.style.top="100px";
--
Dennis
======
Homepage(chinese)
http://hkdennis2k.virtualave.net
var aa=document.createElement('div');
aa.style.position="absolute";
aa.style.left='100px';
aa.style.top='100px';
aa.innerHTML=1
document.body.appendChild(aa);
var bb=document.createElement('div');
document.body.appendChild(bb);
bb.style.position="absolute";
bb.style.left='200px';
bb.style.top='200px';
bb.innerHTML=2
var cc=document.createElement('div');
document.body.appendChild(cc);
cc.style.position="absolute";
cc.style.width="100px";
cc.style.height="100px";
cc.style.left='300px';
cc.style.top='300px';
cc.innerHTML=3
> Here are my example the 3rd one not working
>
> var aa=document.createElement('div');
> aa.style.position="absolute";
> aa.style.left='100px';
> aa.style.top='100px';
> aa.innerHTML=1
> document.body.appendChild(aa);
>
> var bb=document.createElement('div');
> document.body.appendChild(bb);
> bb.style.position="absolute";
> bb.style.left='200px';
> bb.style.top='200px';
> bb.innerHTML=2
>
> var cc=document.createElement('div');
> document.body.appendChild(cc);
> cc.style.position="absolute";
> cc.style.width="100px";
> cc.style.height="100px";
> cc.style.left='300px';
> cc.style.top='300px';
> cc.innerHTML=3
>
>
>
Please direct these issues to : news.mozilla.org
Thank you.
if(v_ns6up || v_ie6up)
{
var container = document.createElement("div");
container.innerHTML = myContent;
container.setAttribute("class", myClassName);
container.setAttribute("id", myName);
document.body.appendChild(container);
}
I rearranged the last 4 lines in multiple ways and it still seemed to
work. Not sure about your code though.
-Mo