[SOLVED] How put icon inside textarea?

Issue

i want to put this icon inside of my textarea in below image.

enter image description here

and here is my code:

<div class="form-group" style="text-align: right;width: 100%;">
          <textarea row=100 cols=60
                    type="text"
                    id="input"
                    formControlName="txt"
                    placeholder="متن ...">
          </textarea>
          <span class="icon-user"></span>
        </div>

anyone knows how i must do for this problem ?

Solution

Here is the example: https://jsbin.com/laduyemewo/edit?html,css,output

The crucial changes here is to the set position: relative; to the parent <div class="form-group"> and apply for <span class="icon-user"></span>position: absolute; with a bottom and left properties based on your sizes.

Answered By – pepsilike

Answer Checked By – Mildred Charles (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *