Left-aligned Text Labels
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Left-aligned Text Labels</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type="text/css" media="all"> fieldset { float: left; clear: left; width: 100%; margin: 0 0 1.5em 0; padding: 0; } legend { margin-left: 1em; color: #000000; font-weight: bold; } fieldset ol { padding: 1em 1em 0 1em; list-style: none; zoom: 1; } fieldset li { float: left; clear: left; width: 100%; padding-bottom: 1em; } label { float: left; width: 10em; margin-right: 1em; } fieldset.submit { float: none; width: auto; border: 0 none #FFFFFF; padding-left: 12em; } </style> </head> <body> <div id="page"> <div id="header"> <h1> Left-aligned Text Labels </h1> </div> <!-- END #header --> <div id="content"> <p> Fill in your details below. We promise that we won't use them to spam you with advertisements ... much. </p> <form action="example.php"> <fieldset> <legend> Contact Details </legend> <ol> <li> <label for="name"> Name: </label> <input id="name" name="name" class="text" type="text" /> </li> <li> <label for="email"> Email address: </label> <input id="email" name="email" class="text" type="text" /> </li> <li> <label for="phone"> Telephone: </label> <input id="phone" name="phone" class="text" type="text" /> </li> </ol> </fieldset> <fieldset class="alt"> <legend> Delivery Address </legend> <ol> <li> <label for="address1"> Address 1: </label> <input id="address1" name="address1" class="text" type="text" /> </li> <li> <label for="address2"> Address 2: </label> <input id="address2" name="address2" class="text" type="text" /> </li> <li> <label for="suburb"> Suburb/Town: </label> <input id="suburb" name="suburb" class="text" type="text" /> </li> <li> <label for="postcode"> Postcode: </label> <input id="postcode" name="postcode" class="text textSmall" type="text" /> </li> <li> <label for="country"> Country: </label> <input id="country" name="country" class="text" type="text" /> </li> </ol> </fieldset> <fieldset class="submit"> <input class="submit" type="submit" value="Begin download" /> </fieldset> </form> </div><!-- END #content --> </div> <!-- END #page --> </body> </html>