Use element.style
:
var element = document.createElement('select');
element.style.width = "100px";
More Related Contents:
- Switch classes on click of button
- Change class value javascript in event onclick?
- Making a Mobile friendly website [closed]
- How can I modify with css an image appended with javascript?
- How to fade animate background images (full size) [closed]
- Using jQuery to center a DIV on the screen
- Changing a CSS rule-set from Javascript
- jQuery: Get height of hidden element in jQuery
- horizontal scrollbar on top and bottom of table
- Difference between Relative path and absolute path in javascript
- Using Javascript in CSS
- How to get the background color code of an element in hex?
- “Uncaught TypeError: a.indexOf is not a function” error when opening new foundation project
- jQuery: Get selected element tag name
- Bootstrap 4 File Input
- Read :hover pseudo class with javascript
- Detect fullscreen mode
- Count down timer with circular progress bar
- Positioning divs in a circle using JavaScript
- JavaScript Loading Screen while page loads
- Materialize CSS – Select Doesn’t Seem to Render
- How can I animate a progressive drawing of svg path?
- Change text color based on brightness of the covered background area?
- jQuery – Sticky header that shrinks when scrolling down
- How do I make an “else” in an IE HTML conditional?
- Divide semi circle with stroke-dasharray and on active color fill
- Find the “potential” width of a hidden element
- Vue.js – Add class to clicked button
- Difference between jQuery’s .hide() and setting CSS to display: none
- css transitions on new elements