serienjunky
New member
Hallo zusammen,
Ich versuche gerade eine scrollbare Tabelle zu erstellen. Aber leider funktioniert es nicht so wie ich es will. Ausserdem macht der IE und der Mozilla wieder was völliges anderes.
Mein Ziel:
Der Kopf und der Fuss der Tabelle sollten fixiert und mit einem Rahmen verziert sein.(Kopf: border-bottom: 2px solid black / Fuss: border-top: 3px double black)
Der Inhalt der Tabelle sollte ab einer gewissen höhe nur vertikal scrollbar sein.
Zudem würde ich gerne zwischen den Zeilen einen Rahmen machen. Weiss aber noch nicht wie ich es realisieren sollte.
Ich wäre sehr Dankbar, wenn mir einer helfen kann.
schöne Festtage wünscht euch
serienjunky
Ich versuche gerade eine scrollbare Tabelle zu erstellen. Aber leider funktioniert es nicht so wie ich es will. Ausserdem macht der IE und der Mozilla wieder was völliges anderes.
Mein Ziel:
Der Kopf und der Fuss der Tabelle sollten fixiert und mit einem Rahmen verziert sein.(Kopf: border-bottom: 2px solid black / Fuss: border-top: 3px double black)
Der Inhalt der Tabelle sollte ab einer gewissen höhe nur vertikal scrollbar sein.
Zudem würde ich gerne zwischen den Zeilen einen Rahmen machen. Weiss aber noch nicht wie ich es realisieren sollte.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Title</title>
<style type="text/css">
th{
text-align:left;
}
td{
height:100px;
}
thead{
border-bottom:2px solid black;
}
tbody{
overflow: scroll;
max-height:200px;
}
tfoot{
border-top:3px double black;
}
</style>
</head>
<body>
<h1>Titel</h1>
<table width="800px">
<colgroup>
<col width="200px">
<col width="200px">
<col width="150px">
<col width="150px">
<col width="100px">
</colgroup>
<thead>
<tr>
<th>Spalte 1</th>
<th>Spalte 2</th>
<th>Spalte 3</th>
<th>Spalte 4</th>
<th>Spalte 5</th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="3"></th>
<th>Spalte 4</th>
<th></th>
</tr>
</tfoot>
<tbody>
<tr>
<td><- Select -><br><- Input -></td>
<td><- Input -></td>
<td><- Input -><- Img -><br><- Input -><- Img -></td>
<td><- Input -></td>
<td><- Img -></td>
</tr>
<tr>
<td><- Select -><br><- Input -></td>
<td><- Input -></td>
<td><- Input -><- Img -><br><- Input -><- Img -></td>
<td><- Input -></td>
<td><- Img -></td>
</tr>
<tr>
<td><- Select -><br><- Input -></td>
<td><- Input -></td>
<td><- Input -><- Img -><br><- Input -><- Img -></td>
<td><- Input -></td>
<td><- Img -></td>
</tr>
<tr>
<td><- Select -><br><- Input -></td>
<td><- Input -></td>
<td><- Input -><- Img -><br><- Input -><- Img -></td>
<td><- Input -></td>
<td><- Img -></td>
</tr>
<tr>
<td><- Select -><br><- Input -></td>
<td><- Input -></td>
<td><- Input -><- Img -><br><- Input -><- Img -></td>
<td><- Input -></td>
<td><- Img -></td>
</tr>
</tbody>
</table>
</body>
</html>
Ich wäre sehr Dankbar, wenn mir einer helfen kann.
schöne Festtage wünscht euch
serienjunky
Zuletzt bearbeitet: