I want to achieve a layout like this:
-----------------------------------------------------------
| |
| fixed height |
| |
|----------------------------------------------------------|
| | s |
| takes all the rest available screen height | c |
| fluid height, not fixed, | r |
| dependent on the screen height | o |
| | l |
| | l |
| | b |
| | a |
| | r |
------------------------------------------------------------
Using css and html, without javascript, is it possible? Scrollbar should be completely visible, from top to bottom.
See: http://jsfiddle.net/s7FH6/show/ (edit)
HTML:
<div id="header"></div>
<div id="content"></div>
CSS:
html, body {
margin: 0;
padding: 0;
overflow: hidden
}
#header {
background: #ccc;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 150px
}
#content {
background: #eee;
position: absolute;
left: 0;
top: 150px;
bottom: 0;
width: 100%;
overflow-y: scroll
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With