1 2 3 4 5 |
/* max-height: 100% is key */ .overlay{background: url(../images/bk_cube.png);z-index: 9999;width: 100%;max-height: 100%;text-align: center;position: fixed; overflow: auto; top:0; left: 0;overflow-y: scroll; display: none;} /* position: static; is key */ #app_detail > .wrapper{width: 1120px; background: #FFF; margin: 0 auto; padding:20px; position: static;} |
1 2 3 4 5 6 |
function show_detail(){ $('body').css({'overflow':'hidden'}); $('#app_detail').show(); init_carousel(); init_gallery(); } |
http://stackoverflow.com/questions/18894400/fixed-position-div-scrollable