<div id="mydiv" style="width: 100%; display: block;">qwerty</div> <div id="write"></div> <script> var znach = document.getElementById('mydiv').offsetWidth + 'px'; document.getElementById('write').innerHTML=znach; </script>