Last active
June 20, 2023 09:24
-
-
Save kunxin-chor/1a4111f2e727ca6e77d949bee69e4585 to your computer and use it in GitHub Desktop.
ATM DOM
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>ATM Machine</title> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
</head> | |
<body> | |
<div class="atm"> | |
<div id="display">Insert card to begin</div> | |
<button id="insert-card">Insert Card</button> | |
<div class="number-pad"> | |
<button value="1" disabled>1</button> | |
<button value="2" disabled>2</button> | |
<button value="3" disabled>3</button> | |
<button value="4" disabled>4</button> | |
<button value="5" disabled>5</button> | |
<button value="6" disabled>6</button> | |
<button value="7" disabled>7</button> | |
<button value="8" disabled>8</button> | |
<button value="9" disabled>9</button> | |
<button value="Cancel" disabled>Cancel</button> | |
<button value="0" disabled>0</button> | |
<button value="Confirm" disabled>Confirm</button> | |
</div> | |
</div> | |
<script src="script.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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
.atm { | |
width: 300px; | |
margin: 0 auto; | |
padding: 20px; | |
border: 1px solid #000; | |
text-align: center; | |
} | |
#display { | |
height: 100px; | |
margin-bottom: 10px; | |
border: 1px solid #000; | |
background-color: #eee; | |
overflow-y: auto; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
font-size: 20px; | |
} | |
.number-pad { | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: space-between; | |
} | |
.number-pad button { | |
flex: 0 0 calc(33.33% - 10px); | |
height: 50px; | |
border: 1px solid #000; | |
background-color: #fff; | |
font-size: 20px; | |
} | |
#insert-card { | |
height: 50px; | |
border: 1px solid #000; | |
background-color: #ccc; | |
font-size: 18px; | |
color: #fff; | |
cursor: pointer; | |
margin-bottom: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment