title: Set div's width equal to another div
body: <p>I want to give my <code>.second_div</code> the width of <code>first_div</code>, but the problem is that the first div does not have a width value given in css and I need to find his width using jQuery.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="first_div"&gt;First Div&lt;/div&gt;
  &lt;div class="second_div"&gt;Second.width == First.width&lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.second_div,
  .first_div {
      border: 1px solid black;
      padding: 2px 4px;
      display:inline-block;
  }
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>$(document).ready(function(){
      $(".second_div").css({'width':($(".first_div").width()+'px')});
  });
  </code></pre>
  
  <p>jsfiddle: <a href="https://jsfiddle.net/ekqecjb8/1/" rel="noreferrer">https://jsfiddle.net/ekqecjb8/1/</a></p>