Hi friends,
i need to add more than 7 columns but possible to add only 4 columns.
if i am adding more than 4 columns table gets collapsed.
please help.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
<title></title>
<style>
.table-fixed tbody {
height: 200px;
overflow-y: auto;
width: 100%;
}
.table-fixed thead, .table-fixed tbody, .table-fixed tr, .table-fixed td, .table-fixed th {
display: block;
}
.table-fixed tbody td, .table-fixed tbody th, .table-fixed thead > tr > th {
float: left;
position: relative;
}
.table-fixed tbody td::after, .table-fixed tbody th::after, .table-fixed thead > tr > th::after {
content: '';
clear: both;
display: block;
}
</style>
</head>
<body>
<div class="container py-5">
<div class="row">
<div class="col-lg-7 mx-auto bg-white rounded shadow">
<!-- Fixed header table-->
<div class="table-responsive">
<table class="table table-fixed">
<thead>
<tr>
<th class="col-3">First</th>
<th class="col-3">Last</th>
<th class="col-3">designation</th>
<th class="col-3">salary</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col-3">Mark</td>
<td class="col-3">Otto</td>
<td class="col-3">engineer</td>
<td class="col-3">10000</td>
</tr>
<tr>
<td class="col-3">Jacob</td>
<td class="col-3">Thornton</td>
<td class="col-3">doctor</td>
<td class="col-3">15000</td>
</tr>
<tr>
<td class="col-3">Larry the Bird</td>
<td class="col-3">India</td>
<td class="col-3">.net developer</td>
<td class="col-3">1000000</td>
</tr>
<tr>
<td class="col-3">Jacob</td>
<td class="col-3">Thornton</td>
<td class="col-3">doctor</td>
<td class="col-3">15000</td>
</tr>
<tr>
<td class="col-3">Jacob</td>
<td class="col-3">Thornton</td>
<td class="col-3">doctor</td>
<td class="col-3">15000</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>