7.21 Designbeispiel: ein Registrierungsformular

Bei manchen Formularen bietet es sich an, die form-Elemente in einer zweispaltigen Tabelle anzulegen, bei der eine Spalte die Felder und die andere die Beschriftungen enthält. In Beispiel 7-1 sehen Sie den Code. Abbildung 7-39 zeigt das Formular ohne Stildefinitionen.

Beispiel 7-1. Formular mit Stil

<form action="registration.cfm" method="post"> <table cellspacing="0"> <tr class="header"> <th colspan="2">Informationen zum Benutzerkonto</th> </tr> <tr class="required"> <th scope="row">Login-Name*</th> <td> <input name="uname" type="text" size="12" maxlength="12" /> </td> </tr> <tr class="required"> <th scope="row">Passwort*</th> <td><input name="pword" type="text" size="12" maxlength="12" /></td> </tr> ...

Get CSS Kochbuch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.