Hallo,
Ich will ein Div-Tag zentrieren. In anderen Foren und in Google habe ich gelesen, dass das mit 'margin:0 auto' und mit 'text-align: center' gehen würde.
Das habe ich Probiert. Im FF ist alles perfekt nur im IE wird das alles ignoriert.
Warum?
Gruß
Klaus
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Title - Test</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="content-language" content="de">
<meta name="author" content="Klaus Grünfeld">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico">
</head>
<body>
<table class="hometable">
<tr>
<td class="head"><center><img src="/img/logo.gif" alt="Logo"></center></td>
<td class="top"><h1>Klau´s Page</h1></td>
</tr>
<tr>
<td class="navi">
<div class='in'><img src='img/button2.gif' width='10' height='10' border='0' alt=''> <a href='?id=home'>Home</a></div>
<div class='in'><img src='img/button2.gif' width='10' height='10' border='0' alt=''> <a href='?id=guestbook'>Gästebuch</a></div>
<div class="login">Angemeldet als:<br><strong>Gast</strong></div>
</td>
<td class="text"><h2>Home
</h2>
<br>
<div class="news" style="width:500px;background:#B5FDBF;padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;border:1px solid;border-color:#00FF00;margin:0 auto;text-align:center;">
<center><u><font size="+1">News</font></u></center><br>
<b>- Keine -</b>
</div><br><br>
</td>
</tr>
</table>
</body>
</html>
CSS auszug:
body{background-color:#FFFFFF;color:#000000;margin:0;}
h1{font-family:Arial;font-size:24px;color:#1F1F1F;text-align:center;}
.head{background-color:#5B79AE;height:58px;width:200px;border-bottom: 1px solid #4F4F4F;padding-left:0px;vertical-align:top;background-image:url(../img/background2.gif);background-repeat:repeat-x;}
.top{background-color:#5B79AE;height:58px;vertical-align:middle;padding-top:18px;border-bottom: 1px solid #4F4F4F;vertical-align:top;background-image:url(../img/background2.gif);background-repeat:repeat-x;}
.navi{font-family:Arial;vertical-align:top;height:100%;background-color:#C7D6E9;padding-top:20px;font-size:16px;border-right: 1px solid #4F4F4F;}
.login{font-family:Arial;padding-top:50px;text-align:center;font-size:16px;}
.text{background-image:url(../img/background.gif);background-color:#E4EAF2;font-family:Arial;vertical-align:top;height:100%;padding-left:1%;padding-top:20px;padding-right:2%;}
.hometable{border-spacing:0px;border-collapse:collapse;width:100%;height:100%;background-color:#E4EAF2;}
.in{font-weight:lighter;padding-left:10px;}
.ac{background-color:#E4EAF2;padding-left:10px;border-left:1px solid #B1ADAD;border-right:1px solid #B1ADAD;border-top:1px solid #B1ADAD;border-bottom:1px solid #B1ADAD;}
.news{width:500px;background:#B5FDBF;padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;border:1px solid;border-color:#00FF00;text-align:left;}
a:link{font-family:Arial;color:#000000;text-decoration:none;}
a:visited{font-family:Arial;color:#000000;text-decoration:none;}
a:hover{font-family:Arial;color:#000000;text-decoration:none;}
a:active{font-family:Arial;color:#000000;text-decoration:none;}