I'm having trouble getting my td to fill 100% of my table. I have tried using the following code:
.table-scroll tbody {
display: block;
overflow-y: scroll;
height: calc(100% - 130px);
}
Even with the display block property, the td
element is still not expanding to 100% of the table width.
You can see the issue in this jsfiddle: https://jsfiddle.net/zuxq2gr0/1/
Here is the CSS code:
.panel-table {
height:auto;
width:300px;
border: 1px solid red;
}
.table-scroll tbody {
display:block;
overflow-y: scroll;
height: calc(100% - 130px);
}
And here is the HTML code:
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="panel-table">
<table class="table table-scroll">
<thead>
</thead>
<tbody>
<tr>
<td>Joseph</td>
</tr>
<tr>
<td>Mary</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
<tr>
<td>Judy</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>