JavaScript – Change the Width of Div
To change the width of a div using JavaScript, get reference to the div element, and assign required value to the element.style.width
property.
Example
Conclusion
In this JavaScript Tutorial, we learned how to change the width of a div using JavaScript.