Looking for a way to transform the rows of a table into full-width cards while maintaining the row layout? Here's what I have tried so far:
tbody>tr {
display: block;
padding: 1rem 0.5rem 1rem 0.5rem;
margin: 1.5rem;
border: 1px solid rgba(0, 0, 0, 0.175) !important;
border-radius: 0.375rem !important;
}
The result currently looks like this: https://i.sstatic.net/rWAvu.png
While close to what I want, the cards need to be full width for proper alignment with the headings. Any suggestions on how to achieve this?
Here is the structure of the table markup:
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-xxl-10 col-xl-12">
<div class="card">
<div class="card-body">
<div class="p-datatable p-component p-datatable-responsive-scroll" data-scrollselectors=".p-datatable-wrapper" pv_id_11>
<div class="p-datatable-header">
</div>
<div class="p-datatable-wrapper">
<table role="table" class="p-datatable-table">
<thead class="p-datatable-thead" role="rowgroup">
<tr role="row">
<!-- th's for headings -->
</tr>
</thead>
<tbody class="p-datatable-tbody" role="rowgroup">
<tr class tabindex="-1" role="row">
<td class role="cell">
"John Smith"
</td>
<!-- other table cells -->
</tr>
<!-- other rows -->
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>