Created
August 1, 2013 11:01
-
-
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/
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
p.inline { | |
label { | |
float: left; | |
} | |
span { | |
display: block; | |
overflow: hidden; | |
padding-left: 10px; | |
} | |
input { | |
width: 100%; | |
} | |
} |
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
<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