0

How do insert the email envelop icon inside the placeholder box,in the form nested under div which is again nested under a section. Below is my code: HTML code:

<section id="newsletter">
<div class="container">
<h2>Subscribe To Our Newsletter.</h2>
<form>
<i class="fa fa-envelope icon"></i> 
<input type="email" placeholder="Enter email....">
<button type="submit" class="subscribe">Subscribe</button>
</form>
</div>
</section>

CSS code:

#newsletter.container i { 
padding: 5px; 
min-width: 10px; 
}
tomerpacific
  • 4,704
  • 13
  • 34
  • 52
  • Does this answer your question? [Use Font Awesome Icon in Placeholder](https://stackoverflow.com/questions/19350291/use-font-awesome-icon-in-placeholder) – johannchopin Feb 26 '20 at 13:52

1 Answers1

0

On placeholder="xxxxxx; Enter email...." ,replace xxxxxx with & #xf0e0; where f0e0 is envelope's unicode. You can find unicode in FontAwesome page http://fontawesome.io/icons/ .

<input type="text" placeholder="&#xf0e0; Enter email...." style="font-family: FontAwesome, Arial; font-style: normal">
Tzimpo
  • 964
  • 1
  • 9
  • 24