title: Using overflow-y with height auto in css
body: <p>I do have a div where I want a scrollbar (<code>overflow-y: auto; height: 300px;</code>) to appear if the text inside it is to big. However, my div already contains the property <code>height:auto;</code> (for some vertical alignment sake). Is there anyway I can keep <code>height:auto</code> and still having the scrollbar appearing when it is necessary ?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class = 'valign scrollbar'&gt;
   My Text
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.valign {
   height: auto;
  }
  
  .scrollbar {
   height: 300px;
   overflow-y: auto;
  }
  </code></pre>