I’m creating a webpage in Twitter Bootstrap (if it matters) and I want the page to be 100%; in height, so there won’t be any empty space on the bottom or the top of the page, as it looks like this now:

And I want it to look like this:

While long pages shouldn’t have any extra whitespace in the container and it would be still 100% in height like this:

But how I can achieve this? As the layout is liquid?
I would use display: table and display: table-row. For older browsers that don’t support display: table you can use Modernizr and a jQuery fallback. Here’s a fiddle:
http://jsfiddle.net/85FHe/11/
For more information on CSS table display support go to http://caniuse.com/css-table.