tabelle verstümmelt.... wieso?

alexorg

Mitglied
hallo, habe folgendes problem:

beim anzeigen einiger daten in einer tabelle wird der erste eintrag korrekt dargestellt bei allen weiteren einträgen wird die tabelle irgendwie aber auseinander gerissen ( siehe screenshot ) finde einfach den fehler nicht (kenne mich allerdings mit tabellen auch net so aus :) )

hier mal der code für die ausgabe der daten:

PHP:
//Alle Dateien anzeigen
    print "<left>";
    print "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
          while ($dat=mysql_fetch_array($dat3))
             {
             print "<tr bgcolor=\"$tabelle\">";
             print "<td><div align=\"left\">$dat[name]</div></td>";
             print "<td><div align=\"right\">Visits = <b>$dat[visits]</b></div></td>";
             print "</tr> </table>";
       print "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$bordercolor\">";
             print "<tr>";
             print "<td><div align=\"left\"> $dat[beschreibung]</div></td>";
             print "</tr> </table>";
       print "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
             print "<tr bgcolor=\"$tabelle\">";
             print "<td><div align=\"left\">Link $dat[linkx]</div></td>";
             print "<td><div align=\"right\"></div></td>";
             print "</tr> </table>";
             print "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$bordercolor\">";
             print "<tr>";
             print "<td><div align=\"left\">
                        <a href=\"index.php?style=edit&action=bearbeiten&id=$dat[id]\">| Bearbeiten |</a> --
                        <a href=\"index.php?style=edit&action=zurueck&id=dat$[id]\">| Zurücksetzen |</a> --
                        <a href=\"index.php?style=edit&action=delete&id=$dat[id]\">| Löschen |</div></td>";
             print "</tr> </table> <br><br>";

          }

//Datei einfügen und Tabelle

   print "<form action=\"index.php?style=edit&action=eintragen\" method=\"POST\">";
   print "<left>";
   print "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$bordercolor\">";
         print "<tr>";
         print "<td><div align=\"left\"> Datensatz eintragen</div></td>";
         print "</tr> </table>";
         
   print "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
         print "<tr bgcolor=\"$tabelle\">";
         print "<td><div align=\"left\">Name: <input type=\"text\" name=\"name\"></div></td>";
         print "</tr> </table>";
         
   print "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$bordercolor\">";
         print "<tr>";
         print "<td><div align=\"left\"><textarea name=\"beschreibung\" cols\"35\" rows=\"6\"></textarea></div></td>";
         print "</tr> </table>";
         
   print "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
         print "<tr bgcolro=\"$tabelle\">";
         print "<td><div align=\"left\">Link: <input type=\"text\" name=\"linkx\"></div></td>";
         print "<td><div align=\"right\"><input type=\"submit\" value=\"Eintragen\"></div></td>";
         print "</tr> </table> <br><br>";
         print "</left>";
         print "</form>";

thx schon mal im voraus,

mfg, alex
 
Zuletzt bearbeitet:
ja des hab ich nun gemacht, nun sieht das zwar schon alle sbesser aus hab aber nun leider noch das problem, dass sie tabellen irgendwie "zusammenwachsen" (siehe screenshot )

woran liegts? hier nochmal mein jetziger code:

PHP:
    print "<center>";
    print "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
          while ($dat=mysql_fetch_array($dat3))
             {
             print "<tr bgcolor=\"$tabelle\">";
             print "<td><div align=\"left\">$dat[name]</div></td>";
             print "<td><div align=\"right\">Visits = <b>$dat[visits]</b></div></td>";
             print "</tr> </table>";
       print "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$bordercolor\">";
             print "<tr>";
             print "<td><div align=\"center\"> $dat[beschreibung]</div></td>";
             print "</tr> </table>";
       print "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
             print "<tr bgcolor=\"$tabelle\">";
             print "<td><div align=\"left\">Link $dat[linkx]</div></td>";
             print "<td><div align=\"right\"></div></td>";
             print "</tr> </table>";
             print "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$bordercolor\">";
             print "<tr>";
             print "<td><div align=\"center\">
                        <a href=\"$PHP_SELF?action=bearbeiten&id=$dat[id]\">| Bearbeiten |</a> --
                        <a href=\"$PHP_SELF?action=zurueck&id=dat$[id]\">| Zurücksetzen |</a> --
                        <a href=\"$PHP_SELF?action=delete&id=$dat[id]\">| Löschen |</div></td>";

          }
             print "</tr> </table> <br><br>";

thx im voraus :)
 
print "</tr> </table>";
--> hier ein, oder zwei <BR>
print "<table width=\"500\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"$bordercolor\">";
print "<tr>";
print "<td><div align=\"center\"> $dat[beschreibung]</div></td>";
print "</tr> </table>";
--> hier auch
print "<table width=\"500\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
 
Zurück