Expanding div to 100% height of page minus pixels

I'm working on a webpage with a tabular layout, with three cells: top, bottom-left, bottom-right. The top cell contains a header element and has a height of 105px. The bottom-left cell is a navigation pane. The header and navigation pane are both fixed. The bottom-right cell is the content pane. The bottom two cells are wrapped in a div. I want the bottom wrapper to be essentially the height of the page minus the height of the header element (105px) so that the whole page is covered. I've looked around, but none of the solutions I've found have worked. This is my CSS (I'm using SASS):

div#lower-container {
position:absolute;
width:100%;
height:100%;
div#navigation {
    width:20%;
    background-color:transparent;
    position:fixed;
    top:105px;
    height:100%;
    border-right:1px solid $blue;
};
div#content {
    position:absolute;
    top:105px;
    width:80%;
    height:100%;
    background-color:white;
    margin-left:20%;
    overflow-y:scroll;
};
};

And here is my HTML code:

<div id="lower-container">
<div id="navigation">
</div>
<div id="content">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
</div>
</div>

And finally, a screenshot of what it looks like now: http://i.imgur.com/jsXa5.png

I would prefer to use pure CSS/SASS, and not JavaScript/jQuery. Thanks!


If I understood you right, you want something like this?
CSS:

#wrapper{
  height:100%;
  width:100%;
   #top:{
      position: absolute;
      height: 135px;
   }
   #content{
      position: relative;
      height:100%;
   }
}

HTML:

 <div id="wrapper">
   <div id="top">PICTURE</div>
   <div id="content">Lorem Ipsum Dolor Sit Amet Bla Bla Bla</div>
 </div>
链接地址: http://www.djcxy.com/p/30006.html

上一篇: CSS:div高度不垂直填充

下一篇: 将div加大到页面100%的高度减去像素