Skip to main content

Create a Responsive Login Form in HTML and CSS in Hindi

Create a Responsive Login Form in HTML and CSS in Hindi

                                                            Login Form in HTML and CSS




In this video, we will we see How to Create a Responsive Login Form in HTML and CSS in Hindi step by step.


As you can see I try to make a Login form that should be different from others available online on any social media. Believe me, you gonna learn many new technique and tips on how to make a Responsive Login Form in HTML and CSS in Hindi.


Let's talk about the background of the Login form in Hindi first. You can see It's a diagonal background and I know must of are thinking how we can create a diagonal webpage. Believe me, I wrote only one line of code to get the diagonal background on my Login Form in Hindi.


background-image: linear-gradient(to top right, #color1 50%, #color2 50%);


Create a Responsive Login Form in HTML and CSS in Hindi


Now we will come to our Center Div. If you noticed I used the same code to give the background color as we did on the main background. I only interchanged the color name and we have an awesome background center div. Also, on how to make a div perfectly center both horizontally and vertically is by using the position and translate property of CSS.

I know most of the programmer at first face problem on how to make the image half center on top and then perfectly center of the total width. Again here we will use the position concept of CSS and also we will use calc() property of CSS and it is the best in making anything responsive.

So what is calc()?
It takes the expression or maths calculation to solve and try to make perfect?

Create a Responsive Login Form in HTML and CSS in Hindi

Finally, we have beautiful centered Input fields and Buttons. Here also I show you how to make the input field centered and responsive.

Point to remember is that Input field is by default Inline, So we need to specify display: block.

I know must of you are here for source code only. Here is the source code.

Index.html file



<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>LoginForm</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Cinzel" rel="stylesheet">
</head>
<body>
<div class="bgimg">
<div class="centerdiv">
<img src="https://cdn1.iconfinder.com/data/icons/flat-business-icons/128/user-128.png" id="profilepic">
<h2>user login</h2>
<form>
<div>
<input type="text" name="" class="inputbox" placeholder="Username">
</div>
<br>
<div>
<input type="Password" name="" class="inputbox" placeholder="Password">
</div>
<br>
<div>
<button type="submit"> LOGIN </button>
</div>
</form> <br>
<div class="FORGOT-SECTION">
<h4>Forget Password?</h4>
</div>
</div>
</div>

</body>
</html>

style.css File Code


*{
margin: 0;
padding: 0;
font-family: 'Cinzel', serif;
}

.bgimg{
width: 100%;
height: 100vh;
background-image: linear-gradient(27deg, #004E95 50%, #013A6B 50%);
}

.centerdiv{
width: 350px;
height: 400px;
position: absolute;
top: 50%;
left: 50%;
background-color: red;
transform: translate(-50%, -50%);
background-image: linear-gradient(27deg, #013A6B 50%, #004E95 50%);
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24);
}

#profilepic{
width: 120px;
height: 120px;
border-radius: 50%;
position: relative;
top: -60px;
left: calc( (350px - 120px) / 2 )
}

h2{
text-align: center;
color: white;
text-transform: uppercase;
font-size: 2em;
word-spacing: 10px;
margin-top: -50px;
margin-bottom: 50px;
text-shadow: -2px 2px 1px #0A84C6;
}

.inputbox{
width: calc(100% - 40px);
height: 30px;
display: block;
margin: auto;
padding: 0 10px;
box-sizing: border-box;
}

::placeholder{
letter-spacing: 2px;
color: black;
}

button{
width: calc(100% - 40px);
height: 30px;
display: block;
margin: auto;
color: white;
background-color: #0A84C6;
border: none;
}

.FORGOT-SECTION{
width: calc(100% - 40px);
line-height: 30px;
display: block;
margin: auto;
color: white;
background-color: dodgerblue;
text-transform: uppercase;
font-size: 0.8em;
text-align: right;
padding-right: 20px;
box-sizing: border-box;
}

Comments

Popular posts from this blog

CSS - CSS Fonts in hindi, css font kya h,css font use kese kre,hindi me Technamdev.blogspot.com

CSS Fonts Properties से text/content के font को set किया जाता | इन properties में content को bold, italic, font size और अन्य प्रकार से styling की जाती है | CSS Font Generic Name and Font Family Name Font Generic Name Font Families का group होता है | जैसे कि, Sans-serif(generic) है और उसके अंतर्गत Arial, Arial Black, Agency FB, BankGothic, Calibri और आदि कई Fonts होते है | Font Family Name ये simple fonts name होते है | जैसे कि Arial, Arial Black, Agency FB, BankGothic, Calibri, और आदि कई | Agency FB Antiqua Architect Arial bankFuturistic BankGothic Blackletter Blagovest Calibri Comic Sans MS Courier Cursive Decorative Fantasy Fraktur Frosty Garamond Georgia Helvetica Impact Minion Modern Monospace Open Sans Palatino Roman Sans-serif Serif Script Swiss Times Times New Roman Verdana Most used Web Safe Font...
HTML Tag क्या होता है – What is HTML Tag and Types of HTML tags in Hindi HTML tag क्या होता है – What is HTML Tag जब भी हम कोई भी webpage डिजाईन करते हैं तो हम उस webpage को डिजाईन करने के लिए कुछ command का उपयोग करते हैं उसको HTML tag कहा जाता है| Tag हमेशा angle bracket के अन्दर लिखा जाता है जैसे  <tag>..</tag>. HTML Tag  बहुत सारे character का set होता है जो की HTML language में commands का काम करता है जिसके द्वारा हम अपने webpage को डिजाईन करते हैं| HTML टैग webpage में hidden keyword होता है जो की हमारे वेब ब्राउज़र को यह बताता है की इस webpage को किस प्रकार formatting करना है| Tags लिखने के रूल: जिस प्रकार programming language में कोई भी function लिखने का रूल होता है उसी प्रकार tags लिखने के भी कुछ रूल होते हैं| तो चलिए देखते हैं की कौन कौन से रूल होते हैं: Tags angle bracket  (<>)  के अन्दर लिखा होना चाहिए| जैसे की <html>. यदि आप tags को angle bracket के अन्दर नहीं लिखेंगे तो वेब ब्राउज़र उसे सिंपल text समझ लेगा और उसे tex...