My div
element contains a span
element, which in turn includes an i
tag. However, the i
element extends outside of both the span
and div
elements.
I am attempting to place an eye icon inside an input field.
Here is my current code - what adjustments should I make?
.fa-eye {
float: right;
display: flex;
}
.fa-eye {
position: absolute;
z-index: 5;
display: block;
}
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="eye">
<span>
<i class="fa fa-eye"></i>
</span>
<input placeholder="term">
</div>