title: CSS Previous element
body: <p>Is there a way to achieve this with <strong>CSS</strong>?<br>
  <strong>element height = 100% minus previous element height</strong></p>
  
  <p>Please don't provide JavaScript answers, because I already have:</p>
  
  <p>CSS:</p>
  
  <pre><code>.mydiv{
      height:100%;
  }
  </code></pre>
  
  <p>JavaScript (jQuery):</p>
  
  <pre><code>$('.mydiv').each(function(){
      $(this).css('height', $(this).height() - $(this).prev().height());
  });
  </code></pre>
  
  <p>Actually, I want to reproduce the second effect of <a href="http://jsfiddle.net/Wct6W/" rel="nofollow">this demo</a> using only CSS.<br>
  Thanks</p>
  
  <p><strong>Edit:</strong><br>
  What I exactly want to achieve: I want two elements to fit vertically in their parent, <strong>without specifying the first element height</strong></p>