I have this code
<!-- <body> (automatically added by jsFiddle) -->
<header id="header">
<h1>Title</h1>
</header>
<div id="mainContent">
Some text. End.<br />
</div>
<!-- </body> -->
How can I stretch #mainContent to fill all the available space below #header ?
That’s for a Windows 8 app, so I can use CSS 3 (including -ms-grid-*) and JavaScript without worrying about browser support!
You can use display:table property for this:
HTML
CSS
Check this http://jsfiddle.net/cD2RK/3/