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
204 changes: 102 additions & 102 deletions index.css
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
html {
height:100%;
}

body {
height:100%;
overflow-y:auto;
display: flex;
justify-content: center;
align-items: center;
}

.calculator {
width: 35%;
height: 70%;
}

.display {
display: flex;
justify-content: flex-end;
align-items: center;
background-color: black;
width: 100%;
/* Only take up 20% of the entire calculator height */
height: 20%;
color: white;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
}

.display > p {
margin-right: 10%;
font-size: 3em;
}

.button-container {
/* Take up the remaining calculator height */
height: 80%;
}

.operation-buttons {
display: flex;
flex-direction: row;
width: 100%;
height: 20%;
border-bottom: 0.5px solid black;
}

.operation-buttons > div {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 25%;
background-color: grey;
}

.operation-buttons > div:not(:last-of-type) {
border-right: 0.5px solid black;
}

.lower-container {
display: flex;
flex-direction: row;
height: 80%;
width: 100%;
}

.numbers {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 75%;
background-color: cyan;
border-bottom-left-radius: 15px;
}

.numbers > div {
display: flex;
justify-content: center;
align-items: center;
width: 33%;
}

.numbers > div:not(:nth-of-type(3n)) {
border-right: 0.5px solid black;
}

.numbers > div:nth-child(-n + 9) {
border-bottom: 0.5px solid black;
}

.equal-button {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 25%;
background-color: orange;
border-bottom-right-radius: 15px;
border-left: 0.5px solid black;
}
html {
height:100%;
}
body {
height:100%;
overflow-y:auto;
display: flex;
justify-content: center;
align-items: center;
}
.calculator {
width: 35%;
height: 70%;
}
.display {
display: flex;
justify-content: flex-end;
align-items: center;
background-color: black;
width: 100%;
/* Only take up 20% of the entire calculator height */
height: 20%;
color: white;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
}
.display > p {
margin-right: 10%;
font-size: 3em;
}
.button-container {
/* Take up the remaining calculator height */
height: 80%;
}
.operation-buttons {
display: flex;
flex-direction: row;
width: 100%;
height: 20%;
border-bottom: 0.5px solid black;
}
.operation-buttons > div {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 25%;
background-color: grey;
}
.operation-buttons > div:not(:last-of-type) {
border-right: 0.5px solid black;
}
.lower-container {
display: flex;
flex-direction: row;
height: 80%;
width: 100%;
}
.numbers {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 75%;
background-color: white;
border-bottom-left-radius: 15px;
}
.numbers > div {
display: flex;
justify-content: center;
align-items: center;
width: 33%;
}
.numbers > div:not(:nth-of-type(3n)) {
border-right: 0.5px solid black;
}
.numbers > div:nth-child(-n + 9) {
border-bottom: 0.5px solid black;
}
.equal-button {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 25%;
background-color: lightgreen;
border-bottom-right-radius: 15px;
border-left: 0.5px solid black;
}
88 changes: 44 additions & 44 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./index.css">
</head>
<body>
<div class="calculator">

<!-- Display region where numbers will be shown -->
<div class="display"><p>1.2</p></div>

<!-- Container holding all the divs -->
<div class="button-container">

<div class="operation-buttons">
<div>+</div>
<div>-</div>
<div>x</div>
<div>÷</div>
</div>

<div class="lower-container">
<div class="numbers">
<div>7</div>
<div>8</div>
<div>9</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>0</div>
<div>.</div>
<div>AC</div>
</div>
<div class="equal-button">=</div>
</div>

</div>

</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./index.css">
</head>
<body>
<div class="calculator">
<!-- Display region where numbers will be shown -->
<div class="display"><p>1.2</p></div>
<!-- Container holding all the divs -->
<div class="button-container">
<div class="operation-buttons">
<div>+</div>
<div>-</div>
<div>x</div>
<div>÷</div>
</div>
<div class="lower-container">
<div class="numbers">
<div>7</div>
<div>8</div>
<div>9</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>0</div>
<div>.</div>
<div>AC</div>
</div>
<div class="equal-button">=</div>
</div>
</div>
</div>
</body>
</html>