I have table with lots of rows. I want to make it vertically scrollable but with fixed headers.
Asked
Active
Viewed 613 times
-2
-
Have you tried Any thing? – Samir Oct 04 '16 at 09:35
-
Yes. i put that table inside this div– Saket Arora Oct 04 '16 at 09:36
-
1http://stackoverflow.com/questions/31433833/fix-table-header-at-top-of-scrollable-div/31434590#31434590 – Franco Oct 04 '16 at 09:37
1 Answers
0
You can use CSS to make the elements of the table scollable.
Say you have table like this:
<table>
<tr>
<th>heading 1</th>
<th>heading 2</th>
</tr>
<tr class='scrollable'>
<td>cell 1</td>
<td>cell 2</td>
</tr>
</table>
Write CSS as below:
.scrollable{
width: 150px;
height: 150px;
overflow: scroll;
}

Vishnu Y S
- 183
- 6
- 18