Marc: Ausrichtung in einer Tabelle

Als erstes ein Beispiel....

<html>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Prompt:</td>
    <td>My Data</td>
  </tr>
  <tr>
    <td colspan="2">
      <input type="text" name="textfield" size="50">
    </td>
  </tr>
</table>
</html>

Wenn ihr diese HTML-Fragment ausführt, dann sieht das Layout etwa so aus:

Prompt:        My Data
[        input-Field       ]

Ich möchte den Wert "My Data"  ohne Abstand zum "Prompt:" ausgerichtet haben, also so:

Prompt: My Data
[        input-Field       ]

Wie kann man das machen ohne eine fixe Breite anzugeben (u.a mit CSS??)

Danke für die Hilfe

Marc

  1. Hallo.

    Wie kann man das machen ohne eine fixe Breite anzugeben (u.a mit CSS??)

    Sieh mal bei http://www.mediaevent.de/ nach. Die lösen das Problem semantisch und syntaktisch.
    MfG, at