I'm struggling with making the header of my Bootstrap 4 table fixed/sticky so that it doesn't scroll along with the content. I've tried adding custom CSS but haven't been successful so far.
Here's a snippet of the code for my table:
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table class="table table-striped table-hover table-bordered">
<thead>
<th scope="col">Name</th>
<th scope="col">Title</th>
<th scope="col">Code</th>
</thead>
<tbody>
<tr id="211140">
<td><a href="view.php?action=viewDetails&ID=PM5281"> Jaxon Copeley</a></td>
<td>Senior Designer</td>
<td>8</td>
</tr>
[additional rows from original text]
</tbody>
</table>