Skip to content

Log in page using HTML and CSS #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 193 additions & 0 deletions log in page using HTML and CSS/login_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
<!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.0">
<title>Log in Page</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html {
font-size: 62.5%;
}

.login-box {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}

.contain {
width: 50rem;
height: 18rem;
margin: 5rem auto;
padding: 3rem;
font-size: 1.8rem;
line-height: 4rem;
border-radius: 1rem;
background-color: #e4e4e4;
box-shadow: 2px 1rem 1.5rem 3px rgb(34 35 50 / 30%);
}

input[type="text"],
input[type="password"],
input[type="submit"] {
padding: 0.2rem;
font-size: 1.6rem;
border-radius: 0.4rem;
}

input[type="submit"] {
background: -webkit-linear-gradient(0deg,
rgb(132 144 255) 0%,
rgb(98 189 252) 100%);
padding: 0.5rem 1rem;
border: none;
color: #f3f4ff;
display: inline-block;
font-size: 1.5rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
}

.log_in {
display: flex;
justify-content: flex-end;
align-items: center;
margin: 2rem 5rem;
}

input[type="submit"]:hover,
input[type="submit"]:active {
box-shadow: -2px 1rem 2rem 0 rgb(132 144 255 / 30%);
}

@media (max-width:1150px) {
html {
font-size: 51%;
}

.contain {
height: 20rem;
}
}

@media (max-width:912px) {
html {
font-size: 50%;
}

.contain {
width: 50%;
height: 19rem;
}
}

@media (max-width:810px) {
html {
font-size: 47%;
}

.contain {
height: 19rem;
}
}

@media (max-width:760px) {
html {
font-size: 46%;
}

.contain {
height: 22rem;
}
}


@media (max-width:660px) {
html {
font-size: 46%;
}

.contain {
height: 25rem;
}
}

@media (max-width:500px) {
html {
font-size: 46%;
}

.contain {
width: 58%;
height: 25rem;
}
}

@media (max-width:400px) {
html {
font-size: 35%;
}

.contain {
width: 50%;
height: 25rem;
}

.log_in {
margin: 1rem 2rem;
}
}

@media (max-width:300px) {
html {
font-size: 25%;
}

.contain {
height: 25rem;
}

.log_in {
margin: 1.5rem 2rem;
}
}
</style>

</head>

<body>
<section class="login-box">
<form action="" class="contain">
<div class="first">
Username / Email:
<input type="text" id="first">
</div>

<div class="password">
Passwoard:
<input type="password" id="password">
</div>

<div class="log_in">
<input type="submit" value="log in" id="submit">
</div>

</form>
</section>
</body>

</html>
159 changes: 159 additions & 0 deletions log in page using HTML and CSS/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html {
/* 1rem = (100/16)*10 */
font-size: 62.5%;
}

.login-box {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}

.contain {
width: 50rem;
height: 18rem;
margin: 5rem auto;
padding: 3rem;
font-size: 1.8rem;
line-height: 4rem;
border-radius: 1rem;
background-color: #e4e4e4;
box-shadow: 2px 1rem 1.5rem 3px rgb(34 35 50 / 30%);
}

input[type="text"],
input[type="password"],
input[type="submit"] {
padding: 0.2rem;
font-size: 1.6rem;
border-radius: 0.4rem;
}

input[type="submit"] {
background: -webkit-linear-gradient(0deg,
rgb(132 144 255) 0%,
rgb(98 189 252) 100%);
padding: 0.5rem 1rem;
border: none;
color: #f3f4ff;
display: inline-block;
font-size: 1.5rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
}

.log_in {
display: flex;
justify-content: flex-end;
align-items: center;
margin: 2rem 5rem;
}

input[type="submit"]:hover,
input[type="submit"]:active {
box-shadow: -2px 1rem 2rem 0 rgb(132 144 255 / 30%);
}

@media (max-width:1150px) {
html {
font-size: 51%;
}

.contain {
height: 20rem;
}
}

@media (max-width:912px) {
html {
font-size: 50%;
}

.contain {
width: 50%;
height: 19rem;
}
}

@media (max-width:810px) {
html {
font-size: 47%;
}

.contain {
height: 19rem;
}
}

@media (max-width:760px) {
html {
font-size: 46%;
}

.contain {
height: 22rem;
}
}


@media (max-width:660px) {
html {
font-size: 46%;
}

.contain {
height: 25rem;
}
}

@media (max-width:500px) {
html {
font-size: 46%;
}

.contain {
width: 58%;
height: 25rem;
}
}

@media (max-width:400px) {
html {
font-size: 35%;
}

.contain {
width: 50%;
height: 25rem;
}

.log_in {
margin: 1rem 2rem;
}
}

@media (max-width:300px) {
html {
font-size: 25%;
}

.contain {
height: 25rem;
}

.log_in {
margin: 1.5rem 2rem;
}
}