When I Press Login button one popup is shown.
In that popup I need default autofocus on Login Input field. Can I achieve that with HTML5/CSS only?
jsfiddle
<div class="main"> <div class="panel"> <a href="#login_form" id="login_pop" onclick="">Log In</a> </div> </div> <!-- popup form #1 --> <a href="#x" class="overlay" id="login_form"></a> <div class="popup"> <h2>Welcome Guest!</h2> <p>Please enter your login and password here</p> <div> <label for="login">Login</label> <input type="text" id="login" value="" autofocus /> </div> <div> <label for="password">Password</label> <input type="password" id="password" value="" /> </div> <input type="button" value="Log In" /> <a class="close" href="#close"></a> </div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With