I need to know the width of the block without padding without jQuery, but it should be indicated only in pixels and be a number.
document.body.onload = function() { alert(document.getElementsByClassName('progressbar').width); } .progressbar { width:20%; height:100px; padding:10px; background:black; } .progressbar .progress { width:100%; height:100%; background:red; } <div class="progressbar"> <div class="progress"></div> </div>