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

Tabellenfeld (td) wird falsch dargestellt

floripipo

Neues Mitglied
Hallöle zusammen. Eine Frage zu HTML, evtl. CSS:

Ich habe eine Tabelle und diese wird im Firefox auch toll dargestellt. Allerdings wird im IE ein Tabellenfeld zu breit dargestellt. Darin wird nur ein Bild, welches maximal 120x120 px gross ist, dargestellt.

Schonmal die Hauptfrage dazu: Wie kann ich ein Table Data <td> explizit auf eine Breite definieren, damit auch der IE das rafft?

Der Code sieht folgendermassen aus (wird per PHP ausgegeben):

HTML:
<?php
echo "<table border=\"1\">
                <tr>
                    <td rowspan=\"5\" width=\"1\"><img src=\"images/users/$profile_ans->BILD\"></td>
                    <td width=\"3\">&nbsp;&nbsp;&nbsp;</td>
                    <td><div style=\"font-family: Arial; font-size: 20px; color: #4983CF;\"><b>$user_ans->VORNAME $user_ans->NACHNAME</b></div></td>
                </tr>
                <tr>
                    <td width=\"3\">&nbsp;&nbsp;&nbsp;</td>
                    <td><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Username:</i> $user_ans->USERNAME</div></td>
                </tr>
                <tr>
                    <td width=\"3\">&nbsp;&nbsp;&nbsp;</td>
                    <td><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Alter:</i> $alter_aktuell</div></td>
                </tr>
                <tr>
                    <td width=\"3\">&nbsp;&nbsp;&nbsp;</td>
                    <td><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Wohnort:</i> $wohnort</div></td>
                </tr>
                <tr>
                    <td width=\"3\">&nbsp;&nbsp;&nbsp;</td>
                    <td><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Heimatort:</i> $heimatort</div></td>
                </tr>
                <tr>
                    <td colspan=\"3\"><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Hobbies:</i> $hobbies</div></td>
                </tr>
                <tr>
                    <td colspan=\"3\">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan=\"3\"><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Lieblinksmusik:</i> $lieblingsmusik<div></td>
                </tr>
                <tr>
                    <td colspan=\"3\">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan=\"3\"><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Lieblingsfilm(e):</i> $lieblingsfilm</div></td>
                </tr>
                <tr>
                    <td colspan=\"3\">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan=\"3\"><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Lieblings-TV-Serie(n):</i> $lieblingstvserie</div></td>
                </tr>
                <tr>
                    <td colspan=\"3\">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan=\"3\"><div style=\"font-family: Arial; font-size: 16px; color: #4983CF;\"><i>Besonderes:</i> $besonderes</div></td>
                </tr>
            </table>";
?>

Sorry für den langen Code, aber naja, die erste Tabelle wird einfach zu breit dargestellt. (die mit dem Bild.)

Wie kann ich diese explizit enger definieren,damit auch der IE das rafft?

Danke vielmals für die Hilfe ^^

lg flo
 
Werbung:
Ähmm… ja, wenn man keine Ahnung hat… öhh…

Also: Die Breite kannst du ganz einfach per CSS definieren mit einem
Code:
td { width:30px }
Eine Angabe, wie du sie gemacht hast, ist nicht zulässig.
 
Werbung:
Zurück
Oben