Skip to content

Instantly share code, notes, and snippets.

@ramsesoriginal
Created February 28, 2012 14:10
Show Gist options
  • Save ramsesoriginal/1932745 to your computer and use it in GitHub Desktop.
Save ramsesoriginal/1932745 to your computer and use it in GitHub Desktop.
Minimal markup form with dynamic same-width labels
/**
* Minimal markup form with dynamic same-width labels
*/
fieldset {
min-width: 100px;
display: inline-block;
}
fieldset input{
float: right;
}
p {
margin-bottom: 2px;
}
<form>
<fieldset>
<p><label for="lorem">lorem</label><input type="text" id="lorem" /></p>
<p><label for="ipsum">ipsum</label><input type="text" id="ipsum" /></p>
<p><label for="li">li</label><input type="text" id="li" /></p>
</fieldset>
</form>​
{"view":"split","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment