Created
October 13, 2011 09:18
-
-
Save kidsil/1283821 to your computer and use it in GitHub Desktop.
The perfect Form Design
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
label { | |
display:inline-block; | |
vertical-align:top; /* if you have a big text area, this would make the label stay at the top */ | |
width:120px; | |
} | |
input,textarea { | |
display:inline-block; | |
width:150px; | |
} | |
</style> | |
</head> | |
<body> | |
<form> | |
<div class="form_row"> | |
<label for="user">User</label> | |
<input type="text" id="user" /> | |
</div> | |
<div class="form_row"> | |
<label for="pass">Password</label> | |
<input type="text" id="pass" /> | |
</div> | |
<div class="form_row"> | |
<label for="email">Email</label> | |
<input type="text" id="email" /> | |
</div> | |
</form> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not use ol's and li's instead of divs with classes set? same effect, less code :D