title: Chrome 30 and the width of elements of type display: table-cell?
body: <p>I'm experiencing a problem with with the latest beta version of Chrome (30.0.1599.14 beta.)</p>
  
  <p>I cannot calculate the true width of elements of type display: table-cell.</p>
  
  <p>Here is some test code that outputs the width of a table cell to the console as the browser window is resized:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;        
      &lt;style&gt;
          .table {
              background: #ffc;
              display: table;
              width: 100%;
          }
          .cell {
              display: table-cell;
              width: 200px;
              border: 1px solid black;
              background: #ff0;
              height: 30px;
          }
          #testCell {
              background: #f00;
          }
      &lt;/style&gt;
  
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          $(document).on( "ready", function() {
              $(window).on( "resize", function() {
                  var width = document.getElementById( "testCell" ).offsetWidth;
                  // non jQuery way, for testing:
                  // var width = document.getElementById( "testCell" ).offsetWidth;
                  console.log( width );
              });
          });
      &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div class="table"&gt;
              &lt;div class="cell" id="testCell"&gt;&lt;/div&gt;
              &lt;div class="cell"&gt;&lt;/div&gt;
              &lt;div class="cell"&gt;&lt;/div&gt;
              &lt;div class="cell"&gt;&lt;/div&gt;
              &lt;div class="cell" &gt;&lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>In latest versions of Safari and Firefox as well as in Chrome 29, this works as expected.  That is to say, even though the width is set in css, because it is a table-cell element, the actual width is whatever fills the parent table element.  So the value will change as the browser window is resized.</p>
  
  <p>However in Chrome 30, even though it renders properly, the width outputted to the console is always the css value: 200.</p>
  
  <p>This is a problem for certain scripts of mine that need to calculate the true width of table-cells for layout purposes.</p>
  
  <p>Any ideas what is going on here, and how I can get it to work in Chrome 30?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Ok I found a workaround.  clientWidth still works as expected, so calculating the width by...</p>
  
  <pre><code>var width = document.getElementById( "testCell" ).clientWidth;
  </code></pre>
  
  <p>...will do the job.  However I would still be interested in knowing what is going on here, if anyone has info.</p>
  
  <p>Thanks!</p>