• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Tabelle vertikal und horizontal zentriert

benderos

Neues Mitglied
Hallo,

ich habe leider keine große Ahnung von HTML und CSS.

Ich möchte eine kleine Startseite schreiben und auf zwei verschiedene Adressen verlinken.

Das Hintergrundbild und die Tabelle stehen schon. Aber das Ausrichten in der Vertikalen klappt nicht. Habe schon vieles ausprobiert., aber irgendwie klappt es nicht.

Hier der Code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="de" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Herzlich Willkommen auf der Webseite von XXX</title>
<style type="text/css">

html
{background: url(home.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

html, body{
width: 100%;
min-height:100%;}
table {
   font: normal normal normal 100% serif;
   border-color: #FFFFFF;
   color: #FFFFFF;
   border: thin border;
   font-family: Arial, Helvetica, sans-serif;
}

}
.auto-style1 {
   border-color: #FFFFFF;
   border-width: 0;
}

.auto-style2 {
   border: 2px solid #FFFFFF;
   color: #FFFFFF;
   text-align: center;
   font-family: Arial, Helvetica, sans-serif;
   font-size: xx-large;
   padding: auto;
}

.auto-style3 {
   text-align: center;
}

</style>
</head>

<body>


<table align="center" cellspacing="20" class="auto-style1" style="width: 400px">
   <tbody class="auto-style3">
   <tr>
     <td class="auto-style2">zur neuen Webseite</td>
   </tr>
   <tr>
     <td class="auto-style2">zur alten W</td>
   </tr>
</table>


</body>

</html>

Danke
 
Werbung:
Zurück
Oben