Skip to main content

Popup Login Form using Only HTML & CSS

In this article, I am going to show you how to create a pop-up login form using only HTML and CSS code. I have previously designed many more types of pop-up login forms, but in that case, I have used JavaScript. I did not use any JavaScript code in this design, only pure HTML and CSS code.

In the case of this type of design, the complete login form is hidden. Instead, a button appears on which the complete login form can be viewed by clicking on it. One type of design is much more attractive than the usual login design and enhances the quality of the website a lot.

 Like the normal form, it has everything here, namely the place to input the email ID and password and a login button. First I made a small button on the web page. Clicking on that button will show the complete login form. 

There is a small cancel button in the login form which if clicked will hide the complete login form again.

Video Tutorial of Popup Login Form

If you want to know the complete step-by-step how I made this design then you must follow the video tutorial below.




 As you can see in the video above, this is a very simple popup login form design. First of all, I made a small login button on the web page. Basically, I have used a Neumorphism design in this login form. 

The Neumorphism designs are basically much more interesting which is just made by the color effect of CSS. In this case, the login form and the color of the background are completely one. Only shades of white and black have been used to give these elements their own shape.

First of all, I used a title in the login form and there is a small cancel button next to it. There are also two input boxes for input and I have used separate icons for both. There is also a login button and some text.

Popup Login Form Design Using only HTML and CSS

Below I have provided the source code needed to make it so you can copy it and use it for your own purposes. For this, first of all, you have to create an HTML and CSS file. Attach the CSS file to the HTML file.

The following codes are HTML programming codes. You copy the codes then paste them into your HTML file.


<!DOCTYPE html>
<!--design By rajtemplate.com-->
<html lang="en" >
<head>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
  <link rel="stylesheet" href="style.css">
<body>
<div class="center">
    <input type="checkbox" id="click">
    <!-- home page button-->
    <label for="click" class="click-me">Login Form</label>
    <div class="content">
      <div class="text"> LOGIN </div> <!--login title-->
        
      <label for="click" id="times">x</label> <!--cancle button-->
   
        <form>
          <!--Email id input place-->
          <div class="field"> 
             <div class="fas fa-envelope"></div>
             <input type="text" placeholder="Email or Phone">
          </div>
          <!--password input place-->
          <div class="field">
             <div class="fas fa-lock"></div>
             <input type="password" placeholder="Password">
          </div>
          <!--Login button-->
          <button>LOGIN</button>
          <!--Exter link-->
          <div class="link">
             Not a member?
             <a href="#">Signup now</a>
          </div>

       </form>

      </div>
    </div>
  </div>
</body>
</html>

The following codes are the CSS code used to style this login form. While using it, you can create a separate CSS file or paste it into your HTML file using style tags in the head section.


body{
  background#dde1e7;  /* web page background color */
  user-select:none;
  min-height100vh;
  margin:0;
  padding:0;
  font-family:sans-serif;
}

.center,.content{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%); 
}

.click-me{  /* 1st button */
  text-align:center;
  font-size:22px;  /* text size */
  line-height:50px;   /* text line height */
  cursor:pointer;
  display:block;
  width:160px;   /* button width */
  height:50px;  /* button height */
  background#dde1e7;  /* button background color */
  box-shadow-3px -3px 7px #fffdfdcc,
              3px 3px 5px rgba(941041210.342); /* button shadow */
  
}

#click{
  display:none;
}

.click-me:hover{
  color#08adef/* button hover effect */
  box-shadowinset 2px 2px 5px #babecc,
              inset -5px -5px 10px #ffffff73;
}
.content{
  background#dde1e7/* login form background Color */
  padding30px 35px 40px;
  box-sizingborder-box;
  border-radius5px;
  opacity:0;
  visibility:hidden;
  width330px;  /* login form width */
  heightauto;
  box-shadow-4px -4px 7px #fffdfdb7,
              3px 3px 5px rgba(941041210.288);
}
 
#times{  /* cancel button */
  background#dde1e7;  /* cancel button background color */
  padding3px;
  padding-left11px;
  padding-right11px;
  border-radius50%;
  position:absolute;
  right:10px;
  top:20px;
  font-size:25px;  
  cursor:pointer;
  box-shadow-4px -4px 7px #fffdfdb7,
              3px 3px 5px rgba(941041210.24);
}
 
#click:checked~.content{
  opacity:1;
  visibility:visible;
}

.text{  /* heading or title */
  font-size30px;  /* title font-size */
  color#000000;  /* title text color */
  font-weight600;
  text-aligncenter;
  letter-spacing2px;
}

form{
  margin-top40px;
}

form .field{
  margin-top20px;
  displayflex;
}
 
.field .fas{
  height50px/* input icon height */
  width60px;   /* input icon width */
  color#868686;
  font-size20px;
  line-height50px;
  bordernone;
  text-aligncenter;
  border-rightnone;
  background#dde1e7;   /* input icon background */
  box-shadowinset 2px 2px 5px #babecc,
              inset -5px -5px 10px #ffffff73;
}

.field input,form button{
  height50px;
  width100%;
  outlinenone;
  font-size19px;
  color#868686;
  padding0 15px;
  border-radius0 5px 5px 0;
  bordernone;
  background#dde1e7
  box-shadowinset 2px 2px 5px #babecc,
              inset -5px -5px 10px #ffffff73;
}
form button{
  color:  #363837;
  margin-top40px;
  border-radius5px!important;
  font-weight600;
  letter-spacing1px;
  cursorpointer;
   box-shadow-3px -3px 7px #fffdfdb7,
                2px 2px 5px rgba(941041210.288);
}
 
button:hover{
  color#339933;
  box-shadowinset 2px 2px 5px #babecc,
              inset -5px -5px 10px #ffffff73;
}

.link{
  margin-top35px;
  color#000000;
  text-aligncenter;
}

.link a{
  color#08adef;
  text-decorationnone;
}

.link a:hover{
  text-decorationunderline;
}

 Hopefully, this popup login form design will work for you if you use the above codes. If there is any problem then of course you can download the codes using the download button below. 

You can watch the video tutorial above to know the complete step-by-step. If there is any problem or error, you can definitely comment.




Comments

Popular Posts

Animated Progress Bar using Only HTML and CSS

Animated progress bar is mainly used in various business and personal web sites. css progress bar helps to organize your knowledge in a beautiful way. In this article, I am going to show you how to create an animated progress bar using only HTML and CSS code. I have made many other types of Progress Bar before but in that case, I have used JavaScript.  I have not used any JavaScript or external JavaScript library for this design. I created this Animated Progress Bar design using Pure HTML and CSS code. Skill bars are used on various websites to streamline the amount of experience, education, etc. with the help of animations. First of all, I have given the background-color: # 30336b of a web page. Then I made a small box here. I used four CSS Progress Bar in that box. The value of this bar will be zero when opening the page then gradually it will reach the pre-determined meaning. Video Tutorial of Pure CSS Progress Bar If you want to know how to make it better then you...

Neumorphism login form UI Design using HTML and CSS

In this article, I will show you how to create a Neumorphism login form UI design . We all know that the login form plays an important role in any website. Basically, we face the login form to access the account on different websites. Where we can log in to our account with a username and password.  Neumorphism is currently a very popular UI trend that is being used extensively to create a variety of web elements. This type of design is more beautiful than ordinary design and it is much easier to make.  This Neumorphism login form I created only with HTML and CSS code. Here is the complete color of the background color and the color of the web element. Basically, in this type of design, the background color of the web page and the element is completely the same. However, in this case, some shadows are created using CSS code which determines the size of these elements.  I put everything here like a normal login form . First of all, I added a title then there is no pla...

Neumorphism Social Media Buttons using HTML & CSS

Neumorphism Social Media Buttons are much more beautiful than ordinary button designs. You can make this type of design using only HTML and CSS. In this article, I am going to show how CSS  Neumorphism social media buttons are created using HTML and CSS code. Earlier I showed the design of many more types of social media buttons using Neumorphism design. Neumorphism is a phenomenal UI trend that is currently being used to create a variety of elements. Such designs are much more attractive and much easier to make. These are basically made using a box-shadow of CSS code.  There are two types of Neumorphism designs , one is dark and the other is light. In this case, I have made light Neumorphism social media buttons. Social media buttons are used in different places so that the user can share the content in his social account. CSS Neumorphism Social Media Buttons [Live Demo]  Below I have given a live demo that will help you understand how this CSS Neumorphism social m...

Sidebar Menu Using Only HTML and CSS

This article shows you how to create sidebar menus using HTML and CSS code only. I have previously created many types of sidebars and navigation menubars using only HTML and CSS code so you can see those designs if you want.  Side Menubar A popular web element is currently used in the sidebar along with menubars on various websites. Undoubtedly the side menu bar is much more attractive and for this, the quality and beauty of the website are greatly enhanced. Under normal circumstances, I have completely hidden the menu bar on the web page.  There is a menu button that can be clicked to view the entire menu bar. There is also a cancel button which, when clicked, will completely hide the sidebar. In the sidebar, I have added links to various menu items, profile names, profile images, social media platforms.  First I gave the profile image and below that, I gave the profile name. Then I added some menu items here and added icons to each menu item. Then I created the...

Sidebar Menu using Only HTML and CSS

Here you will learn how to create Sidebar Menu using Only HTML and CSS. I have created many more sidebar menus but in that case, I have used JavaScript code to make it work. In this case, I did not use any JavaScript or external library.  I have designed the menu on this site using pure HTML and CSS code. Normally it is completely hidden and a small button is found on the home page. When you click on that button, we see the full sidebar menu .  In this case, I have used the profile image to complete it. I also used icons with each menu item.  In this case, instead of JavaScript, I have implemented this HTML sidebar menu  using the checkbox function of HTML code. As I said under normal conditions only we can see a small button. When you click on that button, the full sidebar will appear. This sidebar has a small cancel button which, when clicked, will completely hide the menu bar again. Video Tutorial of Side Navigation Menu If you do not understand what ...