stretch bottom to viewport without absolute positioning

is it possible to stretch the bottom on the "main" div to the viewport bottom without using absolute positioning? Absolute positioning works, but then won't re-position if any new elements are added.

by johntrepreneur

HTML

<div id="wrapper">
    <div id="header">
        HEADER<br>
        <input id="btnNavBar" type="button" value="add/remove nav bar"/>
    </div>
        <div id="main">
            MAIN CONTENT NEEDS TO STRETCH TO BOTTOM OF VIEWPORT, BUT NOT BE ABSOLUTE SO THAT IT WILL AUTOMATICALLY ADJUST FOR ANY NEWLY ADDED DYNAMIC ELEMENTS ABOVE IT SINCE IT'LL STILL BE IN THE NORMAL FLOW.
        </div>
</div>

CSS

html, body {
    height: 100%;
    margin: 0px;
}
#wrapper {
    height: 100%;
    background-color: black;
}
#header {
    height: 11%;
    text-align: center;
    background-color: red;
}
#main {
    background-color: silver;
    height: 89%;
}
/* UNCOMMENT THIS SECTION TO MAKE THE STRETCHING WORK WITH ABSOLUTE POSITIONING, 
    BUT NOT FOR ANY NEWLY ADDED ELEMENTS. be sure to re-run the fiddle after uncommenting this */
/*#wrapper {
    position: relative;
}
#main {
    height: auto;
    position: absolute;
    bottom: 0px;
    top: 50px;
}*/

JavaScript

$('#btnNavBar').click(function(){
    var $navBar = $('#navBar');
    if ($navBar.length == 0)
    {
        $('<div>').prop('id','navBar').css({'height':'4%', 'background-color':'yellow', 'text-align':'center'}).text('Dynamically Added Nav Bar').prependTo($('#main'));
    }
    else
    {
        $navBar.remove();
    }
});