title: Set div width using D3
body: <p>I created a <code>div</code> in my <code>html</code>,</p>
  
  <pre><code>&lt;div id="search"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I want to set its width to 15% of my window width in my Javascript. I'm attempting to use D3 to do this:</p>
  
  <pre><code>var width = 0.15 * window.innerWidth,
      height = 0.95 * window.innerHeight;
  
  var searchcolumn = d3.select("#search")
                      .attr("width", width)
                      .attr("height", height);
  </code></pre>
  
  <p>I can see in the DOM, the width and height of my div has been changed:
  <img src="https://i.stack.imgur.com/TGzw9.png" alt="enter image description here"></p>
  
  <p>However, in the rendered html the <code>div</code> is just <code>10px x 10px</code>. </p>
  
  <p><img src="https://i.stack.imgur.com/JgxTi.png" alt="enter image description here"></p>
  
  <p>Why does this happen? I do not have any <code>CSS</code> that overwrites the size of the <code>div</code>. How do I set my <code>div</code> to my desired width?</p>