title: Wrong div width when getting it with javascript
body: <p>I'm trying to get div's width with javascript. Initially div's width is undefined, ie width depends on amount of text on it. Is it possible to get width of this kind of div? I'm trying to do it with following javascript code, but i'm getting width  differerent from Chrome console when i'm inspecting div   </p>
  
  <pre><code>var mydiv = document.getElementById("error_message");
  var curr_width = mydiv.clientWidth;
  alert(curr_width);
  </code></pre>
  
  <p>Thank you for your attention</p>