I'm working with Zurb's Foundation to create a responsive website, however I've run in to an issue when trying to make my search form responsive.
I have an input field, then to the right of it a <button>
to submit the form. The button has an image within it, which is 70px wide. So what I need to do is have the input field take up 100% of whatever is remaining.
I've tried looking at the overflow: hidden;
method without much luck. I've even tried using percentages, but when you go down to the mobile size the button image is really small due to resizing (a part of foundation).
Here's what I have:
HTML:
<div class="form-search">
<input id="search" type="text" class="input-text" />
<button type="submit" class="button expand postfix">
<img src="images/search-submit.png" />
</button>
</div>
CSS:
div.form-search { overflow: hidden; }
div.form-search input { float:left; overflow: hidden; background: #ebebe7; border: none; padding: 1em; outline: none; }
div.form-search button { display: block; background: none; border: none; padding: 0; margin: 0; }