JSFiddle - React, Tailwind, and code Playground
by Rahul Desai
HTML
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<div id="header-lower">
<button id="shop-by-department"><div>Shop by</div><div class="bold">Department</div></button>
<span id="search-box-container">
<i id="search-icon" class="fa fa-search"></i>
<input type="text" id="search-box" placeholder="Search product"/>
</span>
</div>
CSS
*{
margin: 0;
padding: 0;
}
body{
font-size: 62.5%; /* so, 10px = 1rem */
}
div#header-lower{
margin-top: 1rem;
}
button#shop-by-department{
float: left;
background: transparent;
border: 0.1rem solid grey;
border-radius: 0.2rem;
text-align: left;
padding: 0.2rem;
z-index: -1;
}
.bold{
font-weight: bold;
}
i#search-icon{
float: left;
font-size: 1.5rem;
position: absolute;
margin: 0.5rem;
}
span#search-box-container{
display: block;
overflow: hidden;
padding: 0rem 0.5rem;
}
input#search-box{
height: 2.5rem;
width: 100%;
border: 1px solid grey;
border-radius: 0.2rem;
z-index: -1;
}