Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>Bootstrap Flat Modal Login Modal Form</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script> <style> body { font-family: 'Varela Round', sans-serif; } .modal-login { width: 350px; } .modal-login .modal-content { padding: 20px; border-radius: 5px; border: none; } .modal-login .modal-header { border-bottom: none; position: relative; justify-content: center; } .modal-login .close { position: absolute; top: -10px; right: -10px; } .modal-login h4 { color: #636363; text-align: center; font-size: 26px; margin-top: 0; } .modal-login .modal-content { color: #999; border-radius: 1px; margin-bottom: 15px; background: #fff; border: 1px solid #f3f3f3; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3); padding: 25px; } .modal-login .form-group { margin-bottom: 20px; } .modal-login label { font-weight: normal; font-size: 13px; } .modal-login .form-control { min-height: 38px; padding-left: 5px; box-shadow: none !important; border-width: 0 0 1px 0; border-radius: 0; } .modal-login .form-control:focus { border-color: #ccc; } .modal-login .input-group-addon { max-width: 42px; text-align: center; background: none; border-bottom: 1px solid #ced4da; padding-right: 5px; border-radius: 0; } .modal-login .btn, .modal-login .btn:active { font-size: 16px; font-weight: bold; background: #19aa8d !important; border-radius: 3px; border: none; min-width: 140px; } .modal-login .btn:hover, .modal-login .btn:focus { background: #179b81 !important; } .modal-login .hint-text { text-align: center; padding-top: 5px; font-size: 13px; } .modal-login .modal-footer { color: #999; border-color: #dee4e7; text-align: center; margin: 0 -25px -25px; font-size: 13px; justify-content: center; } .modal-login a { color: #fff; text-decoration: underline; } .modal-login a:hover { text-decoration: none; } .modal-login a { color: #19aa8d; text-decoration: none; } .modal-login a:hover { text-decoration: underline; } .modal-login .fa { font-size: 21px; position: relative; top: 6px; } .trigger-btn { display: inline-block; margin: 100px auto; } </style> </head> <body> <div class="text-center"> <!-- Button HTML (to Trigger Modal) --> <a href="#myModal" class="trigger-btn" data-toggle="modal">Click to Open Login Modal</a> </div> <!-- Modal HTML --> <div id="myModal" class="modal fade"> <div class="modal-dialog modal-login"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Sign In</h4> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <form action="/examples/actions/confirmation.php" method="post"> <div class="form-group"> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-user"></i></span> <input type="text" class="form-control" name="username" placeholder="Username" required="required"> </div> </div> <div class="form-group"> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-lock"></i></span> <input type="text" class="form-control" name="password" placeholder="Password" required="required"> </div> </div> <div class="form-group"> <button type="submit" class="btn btn-primary btn-block btn-lg">Sign In</button> </div> <p class="hint-text"><a href="#">Forgot Password?</a></p> </form> </div> <div class="modal-footer">Don't have an account? <a href="#">Create one</a></div> </div> </div> </div> </body> </html>