javascript how to determine the width of a div code example Example: js get dive width document.getElementById("mydiv").offsetWidth