Skip to content

Instantly share code, notes, and snippets.

@rickary
Created August 1, 2013 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickary/6130394 to your computer and use it in GitHub Desktop.
Save rickary/6130394 to your computer and use it in GitHub Desktop.
Inline Form Fix: Need label and input to be inline. Don't know how long label will be. Want input to fill remaining space. Demo: http://jsfiddle.net/rickary/6EaBZ/
p.inline {
label {
float: left;
}
span {
display: block;
overflow: hidden;
padding-left: 10px;
}
input {
width: 100%;
}
}
<p class="inline">
<label for="test">Label of unknown length:</label>
<span><input type="text" name="test" id="test"></span>
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment