"Login-Popup"
Bootstrap 3.0.0 Snippet by HSarfaraz

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <style> .modal-custom-header{ background-color: #337ab7; color: #fff; text-align: center; } .input-group-addon { color: #fff; background-color: #337ab7; } .form-control, .input-group-addon, .btn, .modal-content { border-radius: 2px; } label{ text-align: left !important; } .close:hover { color: #fff; } </style> <body> <div class="container"> <h2>Login / Registration Modal</h2> <!-- Trigger the modal with a button --> <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#loginModal">Login / Registration Modal <i class="fa fa-sign-in" aria-hidden="true"></i></button> <!-- Modal --> <div class="modal fade" id="loginModal" role="dialog"> <div class="modal-dialog modal-md"> <div class="modal-content"> <div class="modal-header modal-custom-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Login / Registration</h4> </div> <div class="modal-body"> <form id="loginform" class="form-horizontal" role="form"> <div class="form-group"> <label for="username" class="col-md-offset-1 col-md-3 control-label">User Name</label> <div class="col-md-6"> <input type="text" class="form-control input-sm" name="username" placeholder="User Name"> </div> </div> <div class="form-group"> <label for="password" class="col-md-offset-1 col-md-3 control-label">Password</label> <div class="col-md-6"> <input type="text" class="form-control input-sm" name="password" placeholder="password"> </div> </div> <div style="margin-top:10px" class="form-group"> <!-- Button --> <div class="col-sm-12 controls text-center"> <a id="btn-login" href="#" class="btn btn-primary btn-sm"> Login <i class="fa fa-sign-in" aria-hidden="true"></i> </a> <!--<a id="btn-fblogin" href="#" class="btn btn-primary">Login with Facebook</a>--> </div> </div> <div class="form-group"> <div class="col-md-12 control"> <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" > Don't have an account! <a href="#" onClick="$('#loginform').hide(); $('#signupform').show()"> Sign Up Here </a> </div> </div> </div> </form> <form id="signupform" class="form-horizontal" role="form" style="display:none;"> <div id="signupalert" style="display:none" class="alert alert-danger"> <p>Error:</p> <span></span> </div> <div class="form-group"> <label for="email" class="col-md-offset-1 col-md-3 control-label">Email</label> <div class="col-md-6"> <input type="text" class="form-control input-sm" name="email" placeholder="Email Address"> </div> </div> <div class="form-group"> <label for="firstname" class="col-md-offset-1 col-md-3 control-label">First Name</label> <div class="col-md-6"> <input type="text" class="form-control input-sm" name="firstname" placeholder="First Name"> </div> </div> <div class="form-group"> <label for="lastname" class="col-md-offset-1 col-md-3 control-label">Last Name</label> <div class="col-md-6"> <input type="text" class="form-control input-sm" name="lastname" placeholder="Last Name"> </div> </div> <div class="form-group"> <label for="password" class="col-md-offset-1 col-md-3 control-label">Password</label> <div class="col-md-6"> <input type="password" class="form-control input-sm" name="passwd" placeholder="Password"> </div> </div> <div class="form-group"> <label for="icode" class="col-md-offset-1 col-md-3 control-label">Invitation Code</label> <div class="col-md-6"> <input type="text" class="form-control input-sm" name="icode" placeholder="Invitation Code"> </div> </div> <div class="form-group"> <!-- Button --> <div class="col-md-offset-5 col-md-7"> <button id="btn-signup" type="button" class="btn btn-primary btn-sm"> Sign Up <i class="fa fa-user-plus"></i></button> <!--<span style="margin-left:8px;">or</span> --> </div> </div> <!--<div style="border-top: 1px solid #999; padding-top:20px" class="form-group"> <div class="col-md-offset-3 col-md-9"> <button id="btn-fbsignup" type="button" class="btn btn-primary"><i class="icon-facebook"></i>   Sign Up with Facebook</button> </div> </div>--> <div class="form-group"> <div class="col-md-12 control"> <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" > Do you have an account! <a href="#" onClick="$('#signupform').hide(); $('#loginform').show()"> Login Here </a> </div> </div> </div> </form> </div> </div> </div> </div> </div> <div class="container"> <h2>Login / Registration Modal One</h2> <!-- Trigger the modal with a button --> <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#loginModalOne">Login / Registration Modal <i class="fa fa-sign-in" aria-hidden="true"></i></button> <!-- Modal --> <div class="modal fade" id="loginModalOne" role="dialog"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <div class="modal-header modal-custom-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Login / Registration</h4> </div> <div class="modal-body"> <form id="loginformOne" class="form-horizontal" role="form"> <div style="margin-bottom: 25px" class="input-group col-sm-12"> <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span> <input id="login-username" type="text" class="form-control input-sm" name="username" value="" placeholder="username or email"> </div> <div style="margin-bottom: 25px" class="input-group col-sm-12"> <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span> <input id="login-password" type="password" class="form-control input-sm" name="password" placeholder="password"> </div> <div style="margin-top:10px" class="form-group"> <!-- Button --> <div class="col-sm-12 controls text-center"> <a id="btn-login" href="#" class="btn btn-primary btn-sm btn-block"> Login <i class="fa fa-sign-in" aria-hidden="true"></i> </a> <!--<a id="btn-fblogin" href="#" class="btn btn-primary">Login with Facebook</a>--> </div> </div> <div class="form-group"> <div class="col-md-12 control"> <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" > Don't have an account! <a href="#" onClick="$('#loginformOne').hide(); $('#signupformOne').show()"> Sign Up Here </a> </div> </div> </div> </form> <form id="signupformOne" class="form-horizontal" role="form" style="display:none;"> <div id="signupalert" style="display:none" class="alert alert-danger"> <p>Error:</p> <span></span> </div> <div style="margin-bottom: 25px" class="input-group col-sm-12"> <span class="input-group-addon"><i class="fa fa-envelope" aria-hidden="true"></i></span> <input id="register-email" type="text" class="form-control input-sm" name="email" value="" placeholder="Email Address"> </div> <div style="margin-bottom: 25px" class="input-group col-sm-12"> <span class="input-group-addon"><i class="fa fa-user-circle" aria-hidden="true"></i></span> <input id="register-fname" type="text" class="form-control input-sm" name="firstname" value="" placeholder="First Name"> </div> <div style="margin-bottom: 25px" class="input-group col-sm-12"> <span class="input-group-addon"><i class="fa fa-user-circle" aria-hidden="true"></i></span> <input id="register-lname" type="text" class="form-control input-sm" name="lastname" value="" placeholder="Last Name"> </div> <div style="margin-bottom: 25px" class="input-group col-sm-12"> <span class="input-group-addon"><i class="fa fa-lock" aria-hidden="true"></i></span> <input id="register-pwd" type="password" class="form-control input-sm" name="passwd" value="" placeholder="Password"> </div> <div style="margin-bottom: 25px" class="input-group col-sm-12"> <span class="input-group-addon"><i class="fa fa-unlock-alt" aria-hidden="true"></i></span> <input id="register-icode" type="text" class="form-control input-sm" name="icode" value="" placeholder="Invitation Code"> </div> <div class="form-group"> <!-- Button --> <div class="col-md-offset-4 col-md-8"> <button id="btn-signup" type="button" class="btn btn-primary btn-sm"> Sign Up <i class="fa fa-user-plus" aria-hidden="true"></i></button> <!--<span style="margin-left:8px;">or</span> --> </div> </div> <!--<div style="border-top: 1px solid #999; padding-top:20px" class="form-group"> <div class="col-md-offset-3 col-md-9"> <button id="btn-fbsignup" type="button" class="btn btn-primary"><i class="icon-facebook"></i>   Sign Up with Facebook</button> </div> </div>--> <div class="form-group"> <div class="col-md-12 control"> <div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" > Do you have an account! <a href="#" onClick="$('#signupformOne').hide(); $('#loginformOne').show()"> Login Here </a> </div> </div> </div> </form> </div> </div> </div> </div> </div> </body> </html>

Related: See More


Questions / Comments: