Is anyone able to help me successfully place my icon font inside the search input field? I've tried adjusting the margin and padding, but nothing seems to be working!
If you have any insights or suggestions, please let me know. Your help is greatly appreciated.
Please check out the issue in this fiddle:
This is a snippet of my HTML code:
<li id="sb-search" style="float:right; list-style:none; height:20px; bottom:3px; ">
<form id="search">
<input name="q" type="text" size="40" placeholder="Search..." />
<button type="submit"><i class="fa fa-search"></i></button>
</form>
</li>
And here's a snippet of my CSS:
#search {
outline:none ;
border:none ;
}
#search button[type="submit"] {
width: 20px;
background:none;
cursor:pointer;
height:20px;
}
button[type="submit"]>i:hover
{
color: #fff;
}
button[type="submit"]>i
{
background:none;
color:#ccc;
font-size:1.1em;
}
#search input[type="text"]
{
border: 0 none;
background: #141d22;
text-indent: 0;
width:110px;
padding: 6px 15px 6px 35px;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
}