Source: http://blog.donews.com/dodo/archive/2005/06/18/434979.aspx
In the table layout design, the form usually uses two TD latd S. If no table is used, how can we do it with CSS? Take a look at the followingCode
<Style type = "text/CSS">
Label {
Float: left;
Width: 80px;
}
FORM {margin: 0px}
Input {
Width: 180px;
Border: 1px solid #808080
}
Textarea {
Width: 250px;
Height: 150px;
}
# Sbutton {
Margin-left: 80px;
Margin-top: 5px;
Width: 80px;
}
BR {
Clear: left;
}
</Style>
<Form action = "" method = "Post">
<Label for = "user"> name: </label>
<Input type = "text" id = user name = "user" value = ""/> <br/>
<Label for = "email"> Email: </label>
<Input type = "text" id = Email name = "email" value = ""/> <br/>
<Label for = "comment"> Note: </label>
<Textarea id = comment name = "comment">
</Textarea>
<Br/>
<Input type = "Submit" id = "sbutton" value = "OK"/> <br/>
</Form>