You do not need to have an icon inside the input - you can place it next to the input field and remove the border of the input field using CSS.
HTML:
<div class="input-group">
<i class="fa fa-user-circle-o"></i>
<input type="text" class="form-control" placeholder="Enter Name Here" >
</div>
CSS
input{
border:none;
background-color: transparent;
}
input:focus,
select:focus,
textarea:focus,
button:focus {
outline: none;
}
.fa-user-circle-o{
color: gray;
}
Updated fiddle:
https://jsfiddle.net/5db2ho62/2/
Shtut source
share