I'm trying to create an HTML
table where its height is limited and the left side stay fixed while scrolling horizontally (and the table body is scrollable horizontally) but not fixed while scrolling vertically (the left side will be scrollable with the rest of the table).
fixed scrollable
1 body content
2 body content
3 body content
4 body content
. .
. .
. .
I found this solution however, it only addresses an horizontal scrolling. In Eamon Nerbonne jsFiddle example, adding a height: 150px;
to the div will demonstrate the bug I'm trying to solve.
I'd like to find a solution that involve only HTML & CSS.
A little late but I did run across this thread when trying out solutions for myself. Assuming you're using modern browsers nowadays, I came up with a solution using CSS calc() to help guarantee widths met up.
Hope this helps anyone!
Adding another div to the Eamon Nerbonne's solution, gave me the following solution:
jsFiddle
Basically the solution is, if you add another parent div that controls the flow of the secondary div might give you a go.
I added style for the outer div like this: