title: How can set max height for height auto in CSS?
body: <p>I want to set max height for div that set height auto like under code.</p>
  
  <pre><code>.background.left-sidebar {
    height: auto !important;
    padding-bottom: 0;
    right: 0;
    width: 300px;
    background-color: #999999;
    margin-top: 40px;
    margin-right: 300px;
  }
  
  .left-sidebar {
    height: auto;
    width: 300px;
    padding-bottom: 0px;
  }
  
  .left-sidebar-top {
    width: 100%;
    height: 300px;
    background-color: #996699;
  }
  
    &lt;div class="right_block left-sidebar"&gt;
      &lt;div class="content"&gt;
        &lt;div class="top_block left-sidebar-top"&gt;
          &lt;div class="content"&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="marker"&gt;This&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>I try to set <code>height:100%</code>, <code>height:auto</code>, but it doesn't work.</p>
  
  <p>How can set max height for height auto in CSS?</p>
  
  <p><a href="https://plnkr.co/edit/yoydR0?p=preview" rel="nofollow">Plunker</a></p>