I've created the following...
var menu = document.createElement('select');
How would I now set CSS attributes e.g width: 100px?
width: 100px
Use element.style:
element.style
var element = document.createElement('select'); element.style.width = "100px";
1.4m articles
1.4m replys
5 comments
57.0k users