Q:

Set DIV height so that it reaches the bottom of the viewport

How to set the height of this DIV so that it reaches the bottom of the viewport ? The DIV cannot be absolutely positioned ; it's in the flow.
<html>
   <body>
      Hello world...
      <div>xxx</div>
   </body>
</html>

If there is a CSS solution (which I doubt), it's great but using JS/jQuery is fine. CSS3 is fine too.

A:

Using jQuery:
var h = $(window).height() - $('div').offset().top;
$('div').height(h);

DEMO

