The Dev Pages

A knowledge base for web applications development (and beyond)

If you try and set the style attribute of a DOM element with Javascript, the following code WON’T WORK IN IE:

yourelement.setAttribute('style','left:150px; top:150px;');

Instead use: = 'left:150px; top:150px;';

Thanks to Rob on this page

  1. tme Said,

    Sure it won’t work since its Attribute, not Attirbute. 🙂

  2. admin Said,

    Nice catch! I fixed the street jive spelling ‘Attirbute’ to ‘Attribute’.

Add A Comment