I am facing an issue with aligning my search setup vertically inside a div
Below is the code I have written:
HTML:
<div class="search">
<input class="searchfield" type="text" placeholder="Search..." value="" /> <button class="searchbutton">SEARCH</button>
</div>
CSS:
.search{
padding: 0 10px;
font-size: 0.8em;
float: right;
height: 100%;
display: table;
vertical-align: middle;
}
.searchfield{
display: table-cell;
}
.searchbutton{
display: table-cell;
}
Can someone help me figure out what mistake I am making?