This is my HTML form:
<form action="process.php" id="login" method="POST">
<p>Username: <?php echo $form->error("user"); ?></p>
<div>
<input type="text" style="font-size: 13px; color: #7e7e7e;" autocomplete="off" id="user" name="user" maxlength="18" length="18" value="<?php echo $form->value("user"); ?>">
</div>
<p>Password: <?php echo $form->error("pass"); ?></p>
<input type="password" name="pass" id="pass" value="<?php echo $form->value("pass"); ?>">
<p>Email:</p>
<?php echo $form->error("email"); ?>
<input type="text" name="email" value="<?php echo $form->value("email"); ?>">
<input type="hidden" name="fav_continent" value="Default">
<input type="hidden" name="fav_colour" value="Default">
<input type="hidden" name="subjoin" value="1">
<input type="submit" value="Register">
</form>
Here's my custom style for the text input field:
input[type=text], input[type=password], input[type=email] {
background-color: transparent;
border: none;
border-bottom: 1px solid #9e9e9e;
border-radius: 0;
outline: none;
height: 3rem;
width: 100%;
font-size: 1rem;
margin: 0 0 15px 0;
padding: 0;
box-shadow: none;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
transition: all .3s;
}
It looks like this in JSFIDDLE: http://jsfiddle.net/qzrtccLx/
If a user submits the form and either one of the text input fields is empty, how do I make the EMPTY text input field's change from border-bottom: 1px solid #9e9e9e; to border-bottom: 1px solid red;?