I'm currently working on developing collapsible tables, where an outer and inner table are displayed for every row that is clicked.
This is the code I have implemented:
HTML:
<table class="table outerTbl mb-0">
<thead>
<tr>
<th scope="col">SL No.</th>
<th scope="col">Program Details</th>
<th scope="col">Program Levels</th>
<th scope="col">Program Start Date</th>
<th scope="col">Program End Date</th>
<th scope="col">Total Duration</th>
<th scope="col">Start</th>
<th scope="col">Cancel</th>
</tr>
</thead>
<tbody>
<tr>
<!-- Table Row Content -->
</tr>
</tbody>
</table>
I have attempted to set a width of 100% for each level within the actual table but have been unsuccessful. Here are some examples I tried that did not work:
table {
width: 100%;
}
Additionally, one of the tables does not have a 100% width, so I added the following line:
td > table { width:100%; }
I am using Bootstrap v4.1, and despite trying various methods, the tr
and td
in the inner table are not setting to full width. How can I ensure that the inner table spans the full width?