how to set width and height for div in html using javascript code example
Example 1: javascript set element width
document.getElementById("myElID").style.width = "100px";
Example 2: Write the JavaScript code to set the width of element to 50%;
document.getElementById('header').style.width = '50%';