|
|||
Problem mit Breite einer Tabelle
Hallo
Ich habe eine ganz einfache Tabelle: 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="de" lang="de"> <head> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" media="screen" href="Test-01_____TEST.css" /> <title>SPACEart - AGB + Info</title> </head> <body> <h1>AGB + Info</h1> <table> <tr> <td class="links">bis 1 KG</td> <td>nur Premium</td> <td>13,- EUR</td> <td>26,- EUR</td> <td>24,- EUR</td> <td>25,- EUR</td> </tr> <tr> <td class="links">bis 2 KG</td> <td>nur Premium</td> <td>14,- EUR</td> <td>27,- EUR</td> <td>26,- EUR</td> <td>28,- EUR</td> </tr> </table> </body> </html> Code:
body { text-align: center; /* Zentrierung im Internet Explorer */ } h1 { margin: 0 auto 7px; border: 1px solid red; padding: 5px; width: 498px; } table { margin: 0 auto 7px; border-collapse: collapse; width: 510px; padding: 0; } td { border: 1px solid red; } Dabei soll die Breite der Überschrift (h1) und der Tabelle gleich sein und zwar genau 510 Pixel. Ich habe das füe die Überschrift folgendermassen gerechnet: width: (498px) + (2 x padding: 5px) + (2 x border: 1px) = 510px Und für die Tabelle habe ich einfach eine Breite von 510px angegeben. Im Internet-Explorer klappt das auch soweit. Aber im Firefox-Browser wird die Tabelle auf der linken Seite 1 Pixel breiter. Hier mal eine URL, wor man sich das ansehen kann: http://www.SPACEart.de/_Test/agb___TEST.htm Und hier noch ein FireFox-ScreenShot: ´ Wenn mir von Euch jemand sagen könnte, warum sich das im Firefox anders verhält als im IE, würde ich mich sehr freuen. (Im Opera ist übrigens auch richtig dargestellt) Gruß Ingo |
Sponsored Links |
|
|||
Das ist ein Problem, dass die Mozilla Entwickler schon sehr lange haben:
http://bugzilla.mozilla.org/show_bug.cgi?id=155955 http://bugzilla.mozilla.org/show_bug.cgi?id=96463 Ich verstehe diesen Bug nicht. Ich verstehe die Spezifikation nicht. http://www.w3.org/TR/CSS21/tables.ht...apsing-borders Und auch nicht die Testcases, warum das ein Problem sein soll. http://fantasai.inkedblade.net/style...-outer-border/ Es scheint nicht ganz einfach zu sein. |
Sponsored Links |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Iphone Responsive Design Horizontal Breite Problem | Dav-88 | CSS | 1 | 31.07.2012 16:30 |
IE7 Tabelle / CSS Problem | Fewokalender | CSS | 1 | 21.01.2012 17:01 |
Problem ein div über eine tabelle zu legen und relative/absolute zu setzen | spike | CSS | 4 | 13.02.2011 22:25 |
Variable Breite -> Problem Hintergrundgrafik | Korasu | CSS | 2 | 08.01.2010 00:26 |
Problem mit einer Tabelle im IE7 | BootyCall | CSS | 1 | 10.11.2008 09:50 |