I am trying to reduce the load time of my site, and had a lot of scripts to perform a show hide on a login/register button function on my site. I want all users to be able to login and register therefore want to eliminate this.
I have decided to use pure CSS, a bit hacky but I feel its better than using JS.
I referred to this answer, using this jsfiddle in order to solve my issue - this is not my jsfiddle.
Here is my html:
<div class="header-login">
<a href="#" class=""><i class="fa fa-power-off"></i> Login</a>
<div>
<form action="login" method="POST">
<input type="text" name="email" class="form-control" placeholder="Email">
<input type="password" name="password" autocomplete="off" class="form-control" placeholder="Password">
<input type="submit" name="submit" class="btn btn-default" value="Login">
<a href="forgot-password" class="btn btn-link">Forgot Password?</a>
</form>
</div>
</div>
I got myself in a bit of a muddle, so I won't post my attempt. I assume having form objects in a hidden div shouldnt be a problem.
Thanks for your help!