Skip to content
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
41 changes: 41 additions & 0 deletions question-1/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
body{
margin:0px;
}
.cont{
text-align: center;
vertical-align: center;
margin: 0px;
background-color: #7fffa5;
height: 500px;
position: relative;
padding: 2vw;
}

.box{
background-color: #e2b12b;
padding: 2vw;
height: 150px;
width: 350px;
position: absolute;
bottom: 20px;
right: 150px;
}
</style>

</head>


<body>
<div class="cont">
div1
<div class="box">
div2
</div>
</div>
</body>
</html>
45 changes: 45 additions & 0 deletions question-3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Peek-a-Boo</title>
<link rel="stylesheet" href="styles.css">

<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}

.password-container {
position: relative;
}

#password-input {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}

.eye-icon {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}

</style>
</head>
<body>
<div class="password-container">
<input type="password" id="password-input" placeholder="Password">
<span id="eye-icon" class="eye-icon">&#x1F441;</span>
</div>
<script src="script.js"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions question-3/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const passwordInput = document.getElementById("password-input");
const eyeIcon = document.getElementById("eye-icon");

eyeIcon.addEventListener("click", () => {
if (passwordInput.type === "password") {
passwordInput.type = "text";
eyeIcon.innerHTML = "&#x1F440;"; // Closed-eye icon
} else {
passwordInput.type = "password";
eyeIcon.innerHTML = "&#x1F441;"; // Open-eye icon
}
});