Struggling to design an input
for a verification code with just one input instead of four. However, I am facing some challenges:
- The input is not responding correctly when clicked, it's a bit buggy and requires clicking at the end of the input to type anything.
- How can I align dashes with the entered numbers so that it works with all numbers consistently and always remains centered and positioned underneath each number? Is there a particular technique for this?
- Any recommendations and best practices?
input {
width: 500px;
height: 50px;
border-radius: 5px;
border: 1px solid #ededed;
outline: unset !important;
letter-spacing: 80px;
text-indent: 105px;
}
.verf {
position: relative;
float: left;
}
.verf::after {
content: "____";
position: absolute;
left: 0;
bottom: 10px;
color: orange;
font-size: 30px;
font-weight: bold;
letter-spacing: 80px;
text-indent: 105px;
}
<div class="verf">
<input maxlength="4" value="4578"/>
</div>