Menu Content/Inhalt
Tableless Forms PDF Print E-mail
Written by Brandon Hollenbeck   
Wednesday, 11 July 2007
Tableless Forms

The best way I have found to get around using tables in forms, is definition lists. By using the definition list I can control the <dt> and <dd> tag in my css.   

<style>
dl{ margin:0px;
    padding:0px;
    width:auto;}
    
dt{ float:left;
    margin:0px 0px 10px 0px;
    width:100px;}
    
dd{ margin:0px 0px 10px 100px; }
    
dt label{ font-weight: bold; }

</style>
<form method="post" action="">
<dl>
<dt><label for="login_name">User Name:</label></dt>
<dd><input type="text" name="name" id="login_name" size="30" class="inputbox" /></dd>
<dt><label for="login_pass">Password:</label></dt>
<dd><input type="text" name="pass" id="login_pass" size="30" class="inputbox" /></dd>
</dl>
<input type="submit" name="submit" id="submit" value="submit" class="button" />
</form>

 

Here is a preview of what this code will display: 

Image

 

Last Updated ( Saturday, 18 August 2007 )
 
< Prev

Who's Online

Advertise