Full-width input with button

HTML

<a href="#" class="search-btn">Search</a>
<div class="search-field-wrap">
  <input class="search-input" type="text" name="search">
</div>

CSS

.search-btn {
    float: right;
    margin-left: 10px;
    border:1px solid black;
}
.search-field-wrap {
    overflow: hidden;
   
    /* in some cases the padding and border of the input need to be cleared with this: */
    padding-right: 12px; /* 5 + 5 + 1 + 1 */
}
.search-input {
    width: 100%;
    border: 1px solid gray;
    padding: 0 5px;
}