I have this html structure:
<body>
<div id="container">
<div id="header">Not empty</div>
<div id="content">
<div id="inner_header">Not empty</div>
<div id="scrollable_content">Very long content</div>
</div>
</div>
</body>
I want the page to have a fixed height equal to the height of the screen, and I also want a vertical scrollbar for the div scrollable_content
.
I have tried with these styles, but the page I get is larger than the screen, so I get two scrollbars:
html, body {
height:100%;
}
div#container {
height:100%;
}
div#scrollable_content {
height:100%;
overflow-y:auto;
position:absolute;
}
How can I do this with CSS3?
Edit: I found a solution using jQuery (see below). I'd like to know if this is possible using only CSS3?
Thanks in advance!