I have a nice layout which uses an HTML table to create a scrollable sidebar with a simple header. It works good, you can check it out here: jsFiddle demo
Here is the outline of my solution:
<aside>
<table>
<tr>
<td>
<header>
header
</header>
</td>
</tr>
<tr>
<td class="secondcell">
<div class="remaining">
...
</div>
</td>
</tr>
</table>
</aside>
<article>
...
</article>
with the following CSS styles:
aside {
position: absolute;
left:0; top: 0; bottom: 0;
width: 200px;
}
aside header {
height: 100px;
}
aside table {
width:100%;
height:100%;
}
.secondcell {
height:100%;
width:100%;
}
.remaining {
height: 100%;
background-color: red;
overflow-y: auto;
}
article {
position: absolute;
left: 200px;
padding:10px;
}
But unfortunately, I'm using HTML tables which a lot of people don't like, because it's not semantic, etc etc.
So I wanted to reproduce this layout with CSS formatting, but it doesn't work. You can check my attempts here: jsFiddle demo2
Maybe it isn't possible at all so I can't do it with CSS using only divs?
<div>
and<span>
here : htmldog.com/guides/html/intermediate/spandiv and en.wikipedia.org/wiki/Span_and_div – kevin Jun 17 at 11:04<table>
can do a<div>
+CSS
can do better – Novocaine88 Jun 17 at 11:05colspan
to divs and css? – Mr Lister Jun 17 at 11:07