I have a Bootstrap-based HTML page with a table, and I'm trying to achieve both top-aligned and bottom-aligned content within the same cell without using fixed pixel spacing. Is there a way to do this?
Here is a minimal working example:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="274d565242555e671409140916">[email protected]</a>/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="90e0ffe0e0f5e2befae3d0a1bea1a4bea0">[email protected]</a>/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="60020f0f14131412011020544e534e51">[email protected]</a>/dist/js/bootstrap.min.js"></script>
<div class="container">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<table class="table table-striped table-dark">
<thead>
<tr>
<th scope="col">H1</th>
<th scope="col">H2</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div style="height: 100px; background-color: yellow"></div>
</td>
<td>
<div>top - aligned</div>
<div>
<button type="button" class="btn btn-primary btn-sm">Bottom-right</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>