HTML and CSS Reference
In-Depth Information
<input type="text" name="fname" id="fname">
<label for="lname">Last Name:</label>
<input type="text" name="lname" id="lname">
<label for="phone1">Phone Number:</label>
<input type="text" name="phone1" id="phone1" size="3">
<input type="text" name="phone2" id="phone2" size="3">
<input type="text" name="phone3" id="phone3" size="4">
Figure 11.4
Form presenta-
tion with labels
above form
Basic Multicolumn Forms
In the previous example, the fields read from the top down. To change
the order of elements so they appear from left to right, you can make
a small alteration to the styles and markup to give you boxes for
elements that float beside each other ( Figure 11.5 on the next page):
label {
display: block;
margin-top: 1em;
div.field {
float: left;
width: 50%;
(continues on next page)
Search WWH ::

Custom Search