It seems that the position fixed attribute is not working as expected in this scenario. I might be missing something.
I'm trying to keep the input boxes in the first row frozen when scrolling, but none of the solutions I've found seem to be effective.
Check out this link for more information
.table{
text-align:center;
overflow: auto;
table{
width: 95%;
margin: auto;
margin-top: 5px;
}
}
.table_scroll
{
display:block;
height:500px;
overflow-y:scroll;
}
<div class="table">
<table class="table_scroll">
<tbody>
<tr class="main_tr">
<th class="input_col"><input title="empno" placeholder="empno" type="text" class="col_data" id="empno" autocomplete="off"></th>
<th class="input_col"><input title="name" placeholder="name" type="text" class="col_data" id="name" autocomplete="off"></th>
<th class="input_col"><input title="job" placeholder="job" type="text" class="col_data" id="job" autocomplete="off"></th>
<th class="input_col"><input title="boss" placeholder="boss" type="text" class="col_data" id="boss" autocomplete="off"></th>
<th class="input_col"><input title="hiredate" placeholder="hiredate" type="text" class="col_data" id="hiredate" autocomplete="off"></th>
<th class="input_col"><input title="salary" placeholder="salary" type="text" class="col_data" id="salary" autocomplete="off"></th>
<th class="input_col"><input title="comm" placeholder="comm" type="text" class="col_data" id="comm" autocomplete="off"></th>
<th class="input_col"><input title="deptno" placeholder="deptno" type="text" class="col_data" id="deptno" autocomplete="off"></th>
</tr>
<tr id="row1" class="remove table_row">
<td>7369</td>
<td>SMITH</td>
<td>CLERK</td>
<td>7902</td>
<td>1980-12-17</td>
<td>800.00</td>
<td></td>
<td>20</td>
</tr>
<tr id="row2" class="remove table_row">
<td>7370</td>
<td>ALLEN</td>
<td>CLERK</td>
<td>7902</td>
<td>1980-12-17</td>
<td>800.00</td>
<td></td>
<td>20</td>
</tr>
</tbody>
</table>
</div>