Pro-Tutr
How To Create Login And Registration Page Using Bootstrap - Printable Version

+- Pro-Tutr (http://protutr.com)
+-- Forum: Basic Programming Languages (http://protutr.com/forumdisplay.php?fid=23)
+--- Forum: Html (http://protutr.com/forumdisplay.php?fid=24)
+---- Forum: Bootstrap (http://protutr.com/forumdisplay.php?fid=27)
+---- Thread: How To Create Login And Registration Page Using Bootstrap (/showthread.php?tid=228)



How To Create Login And Registration Page Using Bootstrap - Ravishankar Chavare - 12-27-2017

Hello Friends today we are creating a login and registration page using Bootstrap
[Image: aTzkk6im.png]

file 1: 
style.css
Code:
.card-container.card {
   max-width: 350px;
   padding: 40px 40px;
}

.btn {
   font-weight: 700;
   height: 36px;
   -moz-user-select: none;
   -webkit-user-select: none;
   user-select: none;
   cursor: default;
}

/*
* Card component
*/
.card {
   background-color: #F7F7F7;
   /* just in case there no content*/
   padding: 20px 25px 30px;
   margin: 0 auto 25px;
   margin-top: 50px;
   /* shadows and rounded borders */
   -moz-border-radius: 2px;
   -webkit-border-radius: 2px;
   border-radius: 2px;
   -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
   -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
   box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}

.profile-img-card {
   width: 96px;
   height: 96px;
   margin: 0 auto 10px;
   display: block;
   -moz-border-radius: 50%;
   -webkit-border-radius: 50%;
   border-radius: 50%;
}

/*
* Form styles
*/
.profile-name-card {
   font-size: 16px;
   font-weight: bold;
   text-align: center;
   margin: 10px 0 0;
   min-height: 1em;
}

.reauth-email {
   display: block;
   color: #404040;
   line-height: 2;
   margin-bottom: 10px;
   font-size: 14px;
   text-align: center;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
}

.form-signin #inputEmail,
.form-signin #inputPassword {
   direction: ltr;
   height: 44px;
   font-size: 16px;
}

.form-signin input[type=email],
.form-signin input[type=password],
.form-signin input[type=text],
.form-signin button {
   width: 100%;
   display: block;
   margin-bottom: 10px;
   z-index: 1;
   position: relative;
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
}

.form-signin .form-control:focus {
   border-color: rgb(104, 145, 162);
   outline: 0;
   -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgb(104, 145, 162);
   box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgb(104, 145, 162);
}

.btn.btn-signin {
   /*background-color: #4d90fe; */
   background-color: rgb(104, 145, 162);
   /* background-color: linear-gradient(rgb(104, 145, 162), rgb(12, 97, 33));*/
   padding: 0px;
   font-weight: 700;
   font-size: 14px;
   height: 36px;
   -moz-border-radius: 3px;
   -webkit-border-radius: 3px;
   border-radius: 3px;
   border: none;
   -o-transition: all 0.218s;
   -moz-transition: all 0.218s;
   -webkit-transition: all 0.218s;
   transition: all 0.218s;
}

.btn.btn-signin:hover,
.btn.btn-signin:active,
.btn.btn-signin:focus {
   background-color: rgb(12, 97, 33);
}

.forgot-password {
   color: rgb(104, 145, 162);
}

.forgot-password:hover,
.forgot-password:active,
.forgot-password:focus{
   color: rgb(12, 97, 33);
}


file 2:
Login.html
Code:
<!doctype html>
<html lang="en">
 <head>
   <title>Login Page</title>
   <!-- Required meta tags -->
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

   <!-- Bootstrap CSS -->
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
   <link rel="stylesheet" type="text/css" href="style.css">
 </head>
 <body background="https://images.unsplash.com/photo-1449965408869-eaa3f722e40d?auto=format&fit=crop&w=1424&q=1024">
 <div class="container">
       <div class="card card-container">
           <img id="profile-img" class="profile-img-card" src="https://images.unsplash.com/photo-1493994492236-f8d411fd81b6" />
           <p id="profile-name" class="profile-name-card"></p>
           <form class="form-signin" action="" method="POST">
         
               <span id="reauth-email" class="reauth-email"></span>
               <input type="email" id="inputEmail" class="form-control" name="email" placeholder="Email address" required autofocus>
               <input type="password" id="inputPassword" class="form-control" name="password" placeholder="Password" required>
               
               <button class="btn btn-lg btn-primary btn-block btn-signin" value="submit" name="submit" type="submit">Sign in</button>
           <center>New user register <a href="register.html">Here</a>
</center>
           </form><!-- /form -->
         
       </div><!-- /card-container -->
   </div><!-- /container -->

   <!-- Optional JavaScript -->
   <!-- jQuery first, then Popper.js, then Bootstrap JS -->
   <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
 </body>
</html>


file 3:
Code:
<!doctype html>
<html lang="en">
 <head>
   <title>RegisterPage</title>
   <!-- Required meta tags -->
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

   <!-- Bootstrap CSS -->
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
   <link rel="stylesheet" type="text/css" href="style.css">
 </head>
 <body background="https://images.unsplash.com/photo-1449965408869-eaa3f722e40d?auto=format&fit=crop&w=1424&q=1024">
 <div class="container">
       <div class="card card-container">
           <img id="profile-img" class="profile-img-card" src="https://images.unsplash.com/photo-1493994492236-f8d411fd81b6" />
           <p id="profile-name" class="profile-name-card"></p>
           <form class="form-signin" action="" method="POST">
               <div class="form-group">

   <input type="text" class="form-control" id="formGroupExampleInput" placeholder="Enter Name">
 </div>
               
               
               <div class="form-group">
   <label for="exampleFormControlSelect1">Gender</label>
   <select class="form-control" id="exampleFormControlSelect1">
     <option>male</option>
     <option>female</option>

   </select>
 </div>
         
               <span id="reauth-email" class="reauth-email"></span>
               <input type="email" id="inputEmail" class="form-control" name="email" placeholder="Email address" required autofocus>
               <input type="password" id="inputPassword" class="form-control" name="password" placeholder="Password" required>
               <div class="form-group">
               <textarea class="form-control" placeholder="Enter Address" id="exampleFormControlTextarea1" rows="3"></textarea>
                </div>
               
               
               <button class="btn btn-lg btn-primary btn-block btn-signin" value="submit" name="submit" type="submit">Register</button>
               <center>Already Account Login  <a href="login.html">Here</a>
</center>
           </form><!-- /form -->
         
       </div><!-- /card-container -->
   </div><!-- /container -->

   <!-- Optional JavaScript -->
   <!-- jQuery first, then Popper.js, then Bootstrap JS -->
   <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
 </body>
</html>


Demo Visit Here