Bootstrap Login Template


In this tutorial, you'll learn how to create a Responsive Login Template using Bootstrap.


Creating and customizing these bootstrap responsive login template is quite easy. In this example I have included a login template which you can easily create, let’s get started.

Code Example:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap Responsive Login Template</title>
    <link href="favicon.png" rel="icon" type="image/x-icon">
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">
      body{
        background-color: #f1f1f1;
      }
      .form{
        margin: 50px auto;
        padding: 25px 20px;
        background: #333;
        box-shadow: 2px 2px 4px #a5a5a5;
        border-radius: 5px;
        color: #fff;
      }
      .form h2{
        margin-top: 0px;
        margin-bottom: 15px;
        padding-bottom: 5px;
        border-radius: 10px;
      }

      .footer{
        padding: 10px;
      }
    </style>
  </head>
  <body>
    <nav class="navbar-inverse">
      <div class="container-fluid"> 
        <div class="navbar-header"> 
          <button type="button" class="collapsed navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"> 
            <span class="sr-only">Toggle navigation</span> 
            <span class="icon-bar"></span> 
            <span class="icon-bar"></span> 
            <span class="icon-bar"></span> 
          </button> 
          <a href="#" class="navbar-brand">Code Grope</a> 
        </div> 
        <div class="collapse navbar-collapse pull-right" id="navbar-collapse"> 
          <ul class="nav navbar-nav"> 
            <li>
              <a href="#">Home</a>
            </li> 
            <li class="active">
              <a href="#">Login</a>
            </li> 
            <li>
              <a href="#">Registration</a>
            </li> 
            <li>
              <a href="#">Contact</a>
            </li>
          </ul> 
        </div> 
      </div>
    </nav>

    <div class="container">
      <div class="row">
        <div class="col-md-4 col-sm-6 col-xs-12 col-md-offset-4 col-sm-offset-3">
          <div class="bslf form">
            <form action="index.html" method="post">
              <h2 class="text-center">Please login</h2>       
              <div class="form-group">
                 <input type="text" class="form-control" placeholder="Username" required="required">
              </div>
              <div class="form-group">
                <input type="password" class="form-control" placeholder="Password" required="required">
              </div>
              <div class="form-group clearfix">
                <label class="checkbox-inline pull-left"><input type="checkbox"> Remember me</label>
                <button type="submit" class="btn btn-primary pull-right">Log in</button>
              </div>
              <div class="clearfix">
                <a href="forgot-password.html" class="pull-left">Forgot Password?</a>
                <a href="registration.html" class="pull-right">Create an Account</a>
              </div>        
            </form>
          </div>
        </div>
      </div>
    </div>

    <div class="navbar-default navbar-fixed-bottom">
      <div class="text-center footer">Copyright © 2018 Code Grope. All Right Reserved.</div>
    </div>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  </body>
</html>

This returns the following: