I have three different elements positioned at the top of my webpage that I want to make responsive. Here is the code I am currently using:
#prayer_time .page-header {
position: fixed;
top: 40px;
left: 290px;
right: 0;
z-index: 99;
}
#prayer_time .col-md-12 {
position: fixed;
top: 75px;
z-index: 99;
padding-right: 0;
padding-left: 0;
width: 78.5%;
}
<main id="content" role="main" class="main pointer-event">
<div class="content container-fluid" id="prayer_time">
<div class="page-header">
<div class="row align-items-center">
<!-- more code here -->
</div>
</div>
<div class="col-md-12">
<div class="card">
<div class="card-header p-2">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link">
January
</a>
</li>
<!-- more <li> here -->
</ul>
</div>
</div>
</div>
<div class="row gx-2 gx-lg-3">
<div class="col-sm-12 col-lg-12 mb-3 my-lg-2">
<div class="card">
<div class="table-responsive datatable-custom">
<table id="columnSearchDatatable" class="table table-borderless">
<thead class="thead-light">
<tr>
<!-- more code here -->
</tr>
</thead>
<tbody id="set-rows">
<!-- more code here -->
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</main>
I want to make the
<div class="page-header">
, <div class="col-md-12">
, and the <thead>
of <table id="columnSearchDatatable" class="table table-borderless">
elements freeze in position on the page, but I am struggling to make them responsive.
Currently, the code freezes a row, but responsiveness is not working as desired.