Skip to content

Commit

Permalink
added close button
Browse files Browse the repository at this point in the history
  • Loading branch information
aryansharma220 committed Jun 1, 2024
1 parent 028508f commit c126209
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2 deletions.
17 changes: 16 additions & 1 deletion Css-files/login1.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ body * {
background: rgba(208, 50, 50, 0.9);
}

.close-btn {
background-color: transparent;
border: none;
font-size: 36px;
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
color: white;
}




@media only screen and (max-width: 950px) {
.card-login {
width: 85%;
Expand Down Expand Up @@ -175,4 +189,5 @@ body * {
.card-login {
width: 90%;
}
}
}

14 changes: 14 additions & 0 deletions Css-files/signup1.css
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,20 @@ body * {
background: rgba(208, 50, 50, 0.9);
}

.close-btn {
background-color: transparent;
border: none;
font-size: 36px;
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
color: white;
}




@media only screen and (max-width: 950px) {
.card-login {
width: 85%;
Expand Down
7 changes: 7 additions & 0 deletions Html-files/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h1>Login Here<br>Delicious food is waiting for You</h1>
</div>
<div class="right-login">
<div class="card-login">
<button class="close-btn">&times;</button>
<h1>LOGIN</h1>
<br>
<div class="textfield">
Expand Down Expand Up @@ -56,6 +57,12 @@ <h1>LOGIN</h1>

}
})

const closeBtn = document.querySelector('.close-btn');
closeBtn.addEventListener('click', function () {
// document.querySelector('.card-login').style.display = 'none';
window.location.href='../index.html';
});
</script>

</html>
7 changes: 7 additions & 0 deletions Html-files/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ <h1>Sign Up Here<br>Good Food is Good Mood</h1>
</div>
<div class="right-login">
<div class="card-login">
<button class="close-btn">&times;</button>
<h1>SIGN UP</h1>
<br>
<form id="signup-form">
Expand Down Expand Up @@ -60,6 +61,12 @@ <h1>SIGN UP</h1>
pswfield.classList.replace("bxs-show", "bxs-hide");
}
});

const closeBtn = document.querySelector('.close-btn');
closeBtn.addEventListener('click', function () {
// document.querySelector('.card-login').style.display = 'none';
window.location.href='../index.html';
});
</script>

</html>
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body {
.navbar a {
text-decoration: none;
color: white;
font-size: 1.3rem;
font-size: 1.3rem;z
}

.transparent-image {
Expand Down

0 comments on commit c126209

Please sign in to comment.