I recently created a password form in HTML with some nice functions. However, after making a small adjustment, the CSS is causing the elements to shift when clicking on different input boxes. This results in the labels on the form moving slightly up and down.
To visualize the change, here is a JSFiddle link: https://jsfiddle.net/b6hv8wLh/
Below is some of the code:
<div class="container">
<div class="jumbotron" id="firstform">
<h1>Sign up page</h1>
<form id="myform">
<label>Username </label> <input type="text" name="uname" class="f1input" id="uname" data-placement="bottom" title="" data-original-title="Username must be unique" class="mytooltip"><br>
<div class="pwordCheck">
<label>Password </label> <input type="password" class="f1input" id="pword" data-placement="bottom" title="" onkeyup="passwordValidation(); return false;" data-original-title="Password must be more than 6 characters long" class="mytooltip"><br>
<label>Confirm Password </label> <input type="password" class="f1input" id="confpword" onkeyup="passwordValidation(); return false;" data-placement="bottom" title="" data-original-title="Passwords must match" class="mytooltip">
<span id="themessage" class="themessage"></span><br>
</div>
<label>Email </label> <input type="email" class="f1input" id="e-mail"/><br>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Select job
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">Java Developer</a></li>
<li><a href="#">SQL Developer</a></li>
<li><a href="#">Tester</a></li>
</ul>
</div>
<label>Job Role</label> <input type="text" class="f1input"/><br>
<label>Age </label> <input type="number" class="f1input" id="age" oninput="ifOfAge(); return false;"/><br>
<label>Can you drive? </label> <input type="text" class="f1input" id="drive" disabled/><br>
<input type="submit" value="Submit" onclick="usernameAlreadyExists(); return false;"/>
</form>
</div>
I have attempted various methods, such as wrapping the form in different divs and targeting individual elements, but the issue persists. To clarify, my goal is to prevent any change in the labels when users click on the input boxes.
Thank you for your assistance