Skip to content

Instantly share code, notes, and snippets.

@dougalcorn
Created December 18, 2010 15:41
Show Gist options
  • Save dougalcorn/746602 to your computer and use it in GitHub Desktop.
Save dougalcorn/746602 to your computer and use it in GitHub Desktop.
super simplistic form with css to make it line up right
<!-- http://www.quirksmode.org/css/forms.html -->
<html>
<head>
<style>
label,input {
display: block;
width: 150px;
float: left;
margin-bottom: 10px;
}
label {
text-align: right;
width: 75px;
padding-right: 20px;
}
br {
clear: left;
}
</style>
</head>
<body>
<form>
<label for="name">Name</label>
<input id="name" name="name"><br>
<label for="address">Address</label>
<input id="address" name="address"><br>
<label for="city">City</label>
<input id="city" name="city"><br>
<input type="submit" />
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment