Solution 1. If your using bootstraps just add form-control
in p
tag class
attribute
<div class="form-group row">
<label for="password" class="col-md-3 col-form-label">Password</label>
<div class="col-md-9">
<p class="input-password form-control" id="password" contenteditable="true" spellcheck="false"></p>
</div>
</div>
And and some styling into it
<style>
@font-face {
font-family: 'password';
font-style: normal;
font-weight: 400;
src: url('https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/password.ttf');
/* src: url("js/password/password.ttf"); */
}
p.input-password {
font-family: 'password';
}
</style>
Solution 2. Convert p
tag to contenteditable=true and add some styling into it.
<style>
@font-face {
font-family: 'password';
font-style: normal;
font-weight: 400;
src: url('https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/password.ttf');
/* src: url("js/password/password.ttf"); */
}
p.input-password {
font-family: 'password';
width: 100%;
border: 1px solid blue;
border-radius: 5px;
outline: none;
}
</style>
<label for="password" class="col-md-3 col-form-label">Password</label>
<p class="input-password" id="password" contenteditable="true" spellcheck="false"></p>
Also you can copy my JSFiddle
and thanks for this wonderful masker by rafaelcastrocouto.
If you experience some delay on text to circle dot, the better way is to download password masker.
Download the Password Masker here,
then place it to folder path js/password/<your-password.tff-file>
remove
src: url('https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/password.ttf');
Uncomment src: url("js/password/password.ttf");