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

Tabelle zentrieren - IE will nicht

Sneer

Neues Mitglied
Wie der aussagekräftige Titel schon sagt :)
In allen Browser wird die Tabelle zentriert angezeigt, nur im Internet Explorer ist sie rechts ausgerichtet.
Braucht IE besondere Streicheleinheiten damit er die Tabelle zentriert?
 
Im aktuellen IE8 sind die tabellen rechtsbündig.
chrome und firefox macht es mittig (so soll es auch sein).

Hier der CODE:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="de-de">
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>test</title>
  <meta content="sneer" name="author">
  <meta name="keywords" content="test">
  <meta name="description" content="testseite">
  <meta name="robots" content="index">
  <style type="text/css">
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration:none; color: black;}
  </style>
</head>
<body
 style="color: rgb(0, 0, 0); background-color: rgb(225, 225, 225);"
 alink="#000000" link="#999999" vlink="#999999">
<table
 style="width: 800px; height: 90px; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td>header<br>
      <span
 style="font-weight: bold; font-style: italic; font-family: Helvetica,Arial,sans-serif;"></span>
      </td>
    </tr>
  </tbody>
</table>
<table
 style="background-color: rgb(221, 221, 221); width: 800px; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="2" cellspacing="0">
  <tbody>
    <tr>
      <td colspan="1" rowspan="1"
 style="text-align: right;"> <span
 style="font-family: Helvetica,Arial,sans-serif;"><span
 style="font-weight: bold;">platzhalter</span></span><small><span
 style="font-family: Helvetica,Arial,sans-serif; font-weight: bold;"></span></small></td>
    </tr>
  </tbody>
</table>
<table
 style="background-color: rgb(237, 237, 237); width: 800px; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td><img style="width: 800px; height: 10px;"
 alt="Trennlinie" src="banner2.png"></td>
    </tr>
  </tbody>
</table>
<table
 style="background-color: rgb(237, 237, 237); width: 800px; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="20" cellspacing="0">
  <tbody>
    <tr>
      <td colspan="1" rowspan="1" style="width: 40px;"><small><small
 style="font-family: Arial;"><big><span
 style="font-weight: bold;">TEST<br>
      </span><span
 style="font-style: italic; font-weight: bold;"> </span></big></small></small><small><span
 style="font-family: Arial;"></span></small><br>
&nbsp; </td>
    </tr>
  </tbody>
</table>
<table
 style="background-color: rgb(237, 237, 237); width: 800px; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td
 style="width: 800px; vertical-align: middle; color: rgb(102, 102, 102); text-align: center;"><small><span
 style="font-family: Helvetica,Arial,sans-serif;"></span></small><span
 style="font-family: Arial;"><span
 style="font-weight: bold;">platzhalter</span></span></td>
    </tr>
  </tbody>
</table>
<table
 style="color: rgb(192, 192, 192); background-color: rgb(26, 26, 26); width: 800px; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="2" cellspacing="0">
  <tbody>
    <tr>
      <td style="text-align: right;"><small><span
 style="text-decoration: underline;"></span><span
 style="color: rgb(122, 122, 122);"></span></small><small><span
 style="font-family: Helvetica,Arial,sans-serif;"></span></small>platzhalter</td>
    </tr>
  </tbody>
</table>
<table
 style="width: 800px; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="0" cellspacing="0">
  <tbody>
    <tr>
      <td style="text-align: center;">platzhalter<br>
      </td>
    </tr>
  </tbody>
</table>
<br>
</body>
</html>

...bin Anfänger was html betrifft..die Seite habe ich in NVU gebastelt.
WYSIWYG...
 
Soll heißen:
Nimm diesen Doctype:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
 
Prima, danke. Nun klappts!

Aber dadurch habe ich ein neues Problem, jede Tabelle hat nun im unteren Bereich ca. 6 Pixel dazu bekommen, die ich nicht weg bekomme.
Gibts dafür eine logische Erklärung, bzw. wär ich an der Lösung eher interessiert :)
 
nur so nebenbei hab ich vorhin bei nem anderen Thema schon gepostet.
Mach
a,
a:hover {text-decoration: none}
a:hover {color: black;}
 
Das Problem mit den Extra-Pixeln konnte ich bis jetzt noch nicht lösen.
Ändere ich den Doc-Type, gehen die Extra-Pixel wieder weg.
Bin einwenig ratlos.
 
Dein Problem ist für mich nicht nachvollziehbar. In dem Code aus #3 tritt es mit prms DOCTYPE im Firefox nicht auf. Der Quirksmode ist aber definitiv keine gute Alternative. Du solltest unbedingt den Standardsmode nutzen, also einen korrekten DOCTYPE setzen.
 
Zurück
Oben