Ich möchte wissen, warum mein td nicht 100% in meiner Tabelle bekommt.Tabelle td ist nicht 100%
dieser Code existieren müssen:
.table-scroll tbody {
display: block;
overflow-y: scroll;
height: calc(100% - 130px);
}
dies passieren, wenn ich Anzeigeblock verwenden, trotzdem habe ich versucht, so viele Dinge und die td
noch nicht zu 100% der Tabelle
jsfiddle bekommen: https://jsfiddle.net/zuxq2gr0/1/
css:
.panel-table {
height:auto;
width:300px;
border: 1px solid red;
}
.table-scroll tbody {
display:block;
overflow-y: scroll;
height: calc(100% - 130px);
}
html:
<!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>
dies funktionieren wird, bis mehr 'td' Zellen hinzugefügt werden. Und an diesem Punkt, warum benutzt man sogar einen 'Tisch'? Es ist nur extra Markup ohne Nutzen. – zgood
stimme ich voll und ganz zu – Vashnak