Axel Richter: tabelle zentrieren

Beitrag lesen

Hallo,

Oops, mal wieder zu hastig getippt. Es muß natürlich in dem Beispiel
table {width:80%; height:60%; margin:20% 10%;}
heißen.

Aha. Welcher Browser interpretiert das richtig? Ich bin gar nicht so, ich geb Dir was zum Probieren:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Tabelle Mitte Mitte</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
<!--
html, body {margin:0; padding:0; width:100%; height:100%;}
table.mitte {border:1px solid black; width:80%; height:60%; margin:20% 10%;}
table.mitte td {border:1px solid black; text-align:center;}
-->
</style>
</head>
<body>
<table class="mitte">
<tr>
 <td>Zelle</td>
 <td>Zelle</td>
</tr>
<tr>
 <td>Zelle</td>
 <td>Zelle</td>
</tr>
</table>
</body>
</html>

Bin gespannt ;-))

viele Grüße

Axel