html - How to fix the absolute position issue? -
i have question regarding absolute position div.
i have like
<div id='body-container'> <div id='content-wrapper'> contents.... </div> </div> i need make body-wrapper absolute position because of other issues.
my css
#body-container{ position: absolute; right: 0; left: 0; height: 100%; overflow-y: hidden; } i have encounter problem. inside content-wrapper, have dynamic contents added inside. create unwanted scrollbar , div become scrollable in div. there anyway kill scrolling behavior? much.
remove height property #body-container, , fit content's height. no scrollbar.
edit
if need wrapper full height, don't forget set top: 0 property, body won't create scroll:
#body-container{ position: absolute; right: 0; left: 0; top: 0; background: silver; height: 100%; overflow: hidden; } updated: http://jsfiddle.net/qefe5/1/
Comments
Post a Comment