Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/12/2008, 12:38
Avatar de HackmanC
HackmanC
 
Fecha de Ingreso: enero-2008
Ubicación: Guatemala
Mensajes: 1.817
Antigüedad: 17 años, 1 mes
Puntos: 260
Sonrisa Respuesta: Problemas al incluir codigo html con javascript

Hola,

Top, Left, etc., no son attributos del elemento div.
Son propiedades del attributo style del elemento div.

Código:
newdiv.setAttribute("top","55em");
newdiv.setAttribute("left","0em");
Código:
newdiv.setAttribute("id", "caja2");
newdiv.setAttribute("style", "width: 50em; height: 18em; background-color: #edf4f2;");
Otra forma accesando el attributo style y sus propiedades:
http://www.maestrosdelweb.com/editorial/dom/

Saludos,