Skip to content

Instantly share code, notes, and snippets.

@capynet
Last active August 29, 2015 14:06
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 capynet/2f8502502186b18456ad to your computer and use it in GitHub Desktop.
Save capynet/2f8502502186b18456ad to your computer and use it in GitHub Desktop.
Search form responsive
<h1>Resize the window</h1>
<form>
<div class="form-element textfield">
<input type="text">
</div>
<div class="form-element submit-btn">
<input type="submit" value="Search">
</div>
</form>
.form-element {
display: table-cell;
box-sizing: border-box;
}
.textfield {
width:100%
}
.textfield > input {
width:100%
}
/*********************************
This is just some styling.
*********************************/
form {
background: purple;
padding:12px;
}
input {
padding:10px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment