Set CSS property in JavaScript?

Use element.style:

var element = document.createElement('select');
element.style.width = "100px";

Leave a Comment