-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14ba68d
commit c59fbf6
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
*{ | ||
padding: 0; | ||
margin: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body{ | ||
width: 30%; | ||
background-color: #252D33; | ||
position: absolute; | ||
left: 35%; | ||
top: 35%; | ||
|
||
} | ||
.container{ | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: #4D8CB8; | ||
gap: 20px; | ||
} | ||
.dob{ | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 20px; | ||
} | ||
.dob input{ | ||
width: 100%; | ||
padding: 8px; | ||
font-size: 20px; | ||
color: #252D33; | ||
} | ||
.dob button{ | ||
padding: 8px; | ||
width: 50%; | ||
color: white; | ||
font-weight: bold; | ||
background: #252D33; | ||
font-size: 15px; | ||
border-radius: 8px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
const date = document.getElementById('date'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="./age.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="heading"> | ||
<h2>Age Calculator</h2> | ||
</div> | ||
<div class="dob"> | ||
<h2>Enter your date of birth</h2> | ||
<input type="date" name="date" id="date"> | ||
<button>Calculate Age</button> | ||
</div> | ||
<div class="display"></div> | ||
</div> | ||
</body> | ||
</html> |