How to find the width of a div using vanilla JavaScript?

document.getElementById("mydiv").offsetWidth

Leave a Comment