I am trying to p开发者_JAVA百科osition 2 Divs.
I want to have a strip spread 100% across the bottom of the page with a height of 100px and for the div to take up all of the space above it. I would like the top div to scroll and for the bottom one to have no scroll capability. Does anyone know how to code this? I am using the below code:
menubar
{ width:100%; height:100px; position: absolute; }
content
{ width:100%; height:530px; position: absolute; }
See if this helps (if using a separate CSS from your HTML):
CSS:
#wrapper {float: left; width: auto; heigth: auto; position: absolute; bottom: 0px;}
#top {width: 100%; Height: 100%; Position: relative; Overflow: auto;}
#bottom {width: 100%; height: 100px; position: relative; Overflow: hidden;}
HTML:
<div id="wrapper"> <div id="top"> DIV CONTENT GOES HERE </div> <div id="bottom"> DIV CONTENT GOES HERE </div> </div>
It is recommended that you separate your CSS from the html by separate files or references. (You could also just integrate them within each other.)
精彩评论