I have a table but when I scroll down the page, my header in the table was a move to the top and disappeared, how can I make a fixed header in my table?
I want this header fixed even though when I scroll down using mouse. I want to make <table><thread><tr> <th> that header must be fixed.
Please help me.
<div class="container" data-aos="fade-up">
<div class="section-title">
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<br />
<table id="submissionTable" class="table table-striped table-hover table-bordered" style="font-size: 10px;">
<thead>
<tr class="info" style="height:50px; width:100px; font-size:14px;">
<th>Item Name</th>
<th style="width:5%; text-align:center">
Scis Sold
</th>
<th>Square Sold</th>
<th>Return</th>
<th>PO</th>
<th>Inventory In</th>
<th>Inventory Out</th>
<th>Actual Qty</th>
</tr>
</thead>
<tbody>
<tr id="tablerow0">
<td>
<select id="Gif0" name="store_Invs[0].Item_name" style="width: 250px;height: 30px;">
@foreach (var item in ViewBag.PolicyOrgs)
{
<option value="@item.Id">@item.Barcode| @item.Item_name</option>
}
</select>
</td>
<td>@Html.TextBoxFor(modelItem => modelItem.store_Invs[0].Scis_sold, new { @style = "width: 40px; height: 35px", @class = "scisso" })</td>
<td>@Html.TextBoxFor(modelItem => modelItem.store_Invs[0].Square_sold, new { @style = "width: 40px; height: 35px" })</td>
<td>@Html.TextBoxFor(modelItem => modelItem.store_Invs[0].Return_so, new { @style = "width: 40px; height: 35px" })</td>
<td>@Html.TextBoxFor(modelItem => modelItem.store_Invs[0].Po_rec, new { @style = "width: 40px; height: 35px" })</td>
<td>@Html.TextBoxFor(modelItem => modelItem.store_Invs[0].Po, new { @style = "width: 40px; height: 35px" })</td>
<td>@Html.TextBoxFor(modelItem => modelItem.store_Invs[0].Adj, new { @style = "width: 40px; height: 35px" })</td>
<td>@Html.TextBoxFor(modelItem => modelItem.store_Invs[0].Actual_qty, new { @style = "height:30px;" })</td>
<td><button type="button" class="btn btn-primary" onclick="removeTr(0);">Delete</button></td>
</tr>
</tbody>
</table>
<br />
<div class="form-group">
<div>
<input type="submit" value="Submit" class="get-started-btn" style="font-size:20px" />
</div>
</div>
</div>
}
</div>
</div>