i need to create a input with html and css .
it must have icon , placeholder , icon in that .
like this :
i try to create this by this html code :
<div class="username"> <i class="fa fa-envelope icon"></i> <input type="text" placeholder="Username"> </div> <div class="password"> <i class="fa fa-envelope icon"></i> <input type="password" placeholder="Password"> </div> and this css code :
.username input[type="text"]{ padding: 5px; position: relative; border-radius: 2px; border:1px solid #ECF0EF; height: 35px; -webkit-box-shadow: 0px 0px 28px -15px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -15px rgba(0,0,0,1); box-shadow: 0px 0px 28px -15px rgba(0,0,0,1); } .username i{ position: absolute; z-index: 9999; height: 10px; line-height: 2; } .password input[type="password"]{ padding: 5px; position: relative; border-radius: 2px; border:1px solid #ECF0EF; height: 30px; -webkit-box-shadow: 0px 0px 28px -15px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -15px rgba(0,0,0,1); box-shadow: 0px 0px 28px -15px rgba(0,0,0,1); } .password input::after{ content: '<i class="fa fa-envelope icon"> '; } .password i{ position: absolute; z-index: 9999; height: 10px; line-height: 2; } but it not worked .
this is Demo
how can i do create like that ??
