html - Make navigation div expand entire height of the page -


i have navigation div on left of page. want span entire height of page.following html , css structure.

#wrapper{    position: relative;    min-height: 100%;    height: auto !important;    height: 100%;    margin: 0 auto -112px;  }  .main_wrap{    height: 100%;    min-height: 100%;    position: relative;  }    .container{    height: 100%;    position: relative;  }  .main-sidebar{    position: absolute;    top: 0;    left: 0;    min-height: 100%;    height: 100%;    width: 195px;    z-index: 810;  }  .sidebar{    height: 100%;  }  .content_wrap{    height: 100%;    min-height: 100%;    position: relative;  }  .content_box{    width: 1000px;    margin: 0px auto;  }
html:  <div id=“wrapper>    <div class=“main_wrap”>      <div class=“container>        <div class="main-sidebar">          <div class="sidebar">           <!—left navigation part goes here—>          </div>        </div>      </div>    </div>      <div class=“content_wrap”>     <div class=“content_box”>      <!—content part goes here—>     </div>    </div>  </div>

help appreciated. thanks!!

you defined height twice in #wrapper. remove height: auto !important; if want take 100% of height, because auto makes div fit content. !important makes auto override 100% defined after.

your wrapper class should :

#wrapper {   position: relative;   min-height: 100%;   height: 100%;   margin: 0 auto -112px; } 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -