1
I am working on the front of a login and I am wanting to insert the contact icons for the email field and the lock for the password. I want to insert before the message of placeholder. I am not using Bootstrap. I would have been able to do this with the selector ::before
? and would also use something analogous to :nth-child()
when passing the address of these icons?
body {
margin: 0px;
padding: 0px;
}
.login {
margin: auto;
width: 350px;
height: 540px;
margin-top: 50px;
background-color: #cc252f;
position: relative;
}
.fields {
margin: auto;
width: 240px;
height: 100px;
}
.fields input {
font-size: 1em;
width: 98%;
height: 46%;
padding-left: 5px;
margin-top: 2px;
border-radius: 5px;
border: 0px;
}
<div class="login">
<div class="fields">
<input type="email" maxlength="30" name="email" id="email" placeholder="e-mail"><br>
<input type="password" maxlength="16" name="pwd" id="pwd" placeholder="senha">
</div>
</div>
Congratulations on your question was one of the best I’ve seen in weeks. But as you can see here it is not possible to place a pseudo direct element in the https://answall.com/questions/263040/os-pseudo-elements-after-e-before-functions-em-quais-input-types
– hugocsl
The least you can do when you need help and make the question as clear as possible. I’m glad you thought it was done right, the trend here is to improve. Abs!
– Lucas Inácio
Lucas what I see here is that most people want help, but are too lazy to even write a question with details. There are people who come to post an image and say "I want it" and only. Yes we always seek to make us better, so I made an issue in the haha answer. Abs
– hugocsl