In my application, I have to display the bootsatarp grid for database entries. Since the number of entries is large enough to be viewed without having to fully scroll through the page, I wrap my table with a pre-scrollable div bootstrap, and this has enabled me to scroll through the table. However, all the time, the DIV is half the browser window. I tried almost everything and the suggestions, and they just do not work for me. I also tried to fix this with a java script, and it also failed.
This is my HTML code.
<div class="col-md-9">
<div class="pre-scrollable">
<table class="table table-bordered table-hover header-fixed" id="sometable">
<thead>
<tr>
<th>EMP_No</th>
<th>Name</th>
<th>Designation</th>
<th>Department</th>
<th>Type</th>
<th>#Days</th>
<th>Start Date</th>
<th>End Date</th>
<th>Half day</th>
<th>Status</th>
</tr>
</thead>
<tbody>
</tbody>
<?php
?>
</div>
</div>
I populate the table above with the results of the PHP code. I do not know how to set this DIV height to a fixed value or the full value of browser windows. Below are the CSS that use
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: center;
padding: 1px;
}
thead th {
text-align: center;
background-color: #3498db;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
This is the results web page.