Answers for "hower input icon in html"

1

show icon in input field

background: url(images/comment-author.gif) no-repeat scroll 7px 7px;
padding-left:30px;
Posted by: Guest on May-28-2021
0

html input with icon right

<div class="input-icon-wrap">
  <span class="input-icon">
    <span class="fa fa-user"></span>
      
    </span>
  <input type="text" class="input-with-icon" id="form-name">
</div>  	


// css
.input-icon-wrap {
  border: 1px solid #ddd;    
  display: flex;
  flex-direction: row;
}

.input-icon {
  background: #ddd;
}

.input-with-icon {
  border: none;
  flex: 1;
}

.input-icon, .input-with-icon {
  padding: 10px;
}
Posted by: Guest on January-13-2021

Browse Popular Code Answers by Language