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
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ <h1>Calculate Anything</h1>

<button id="multiply" onclick="document.getElementById('display').value +='*'">*</button>
<!-- disableb the button so that the hover effect to be changed for disableb buttons -->
<button disabled class="noHover"></button>

<button id="dzero" onclick="document.getElementById('display').value +='00'">00</button>
<button id="decimal" onclick="document.getElementById('display').value +='.'">.</button>

<button id="zero" onclick="document.getElementById('display').value +='0'">0</button>

<button disabled class="noHover"></button>


<button id="equal" type="submit" onclick="calculate(display.value)">=</button>

</div>
</div>

Expand Down
66 changes: 21 additions & 45 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@ html, body {
overflow-x: hidden;
}

/* used white colour for foreground so that disabled button is not visible to the screen */
button:disabled{
color: #f1f1f1;
}
/* made the hover background color to white so the annoying hover in empty space is removed */

button:disabled:hover{
color:white;
background-color:white;
}
.noHover{
pointer-events: none;
}

body {
font-family: monospace;
Expand All @@ -41,10 +28,10 @@ h1 {
justify-content: center;
align-items: center;
margin: auto;
height: 410px;
width: 340px;
box-shadow: 6px 8px 2px grey;
background: white;
height: 550px;
width: 420px;
box-shadow: 8px 10px 4px grey;
background: black;
border-radius: 10px;
}

Expand All @@ -62,16 +49,16 @@ input {

#display {
outline: none;
width: 280px;
height: 40px;
width: 380px;
height: 60px;
background: #f1f1f1;
border-radius: 10px;
border-color: none;
border: none;
}

.keyboard {
width: 330px;
width: 400px;
position: relative;
top: 40px;
margin: 10px;
Expand All @@ -81,16 +68,24 @@ input {
button {
font-family: sans-serif;
font-weight: bolder;
font-size: 22px;
font-size: 25px;
color:"black";
background: white;
border: none;
margin: 6px;
padding: 12px;
margin:12px;

padding-top: 2px;
padding-bottom:2px;
outline: none;
border-radius: 50%;
width: 49px;
height: 45px;
border-radius: 20%;
width: 60px;
height: 50px;
box-shadow: 2px 4px 2px grey;
}


button:hover {
box-shadow: 2px 4px 2px white;
}

button:nth-child(1) {
Expand All @@ -113,14 +108,6 @@ button:nth-child(4) {
button:nth-child(8) {
background: aqua;
}

button:nth-child(12) {
padding: 0px;
font-size: 30px;
font-family: monospace;
background: orange;
}

button:nth-child(16) {
background: pink;
font-size: 25px;
Expand All @@ -129,14 +116,3 @@ button:nth-child(16) {
button:nth-child(20) {
background: yellow;
}

button:hover {
background: rgba(230, 108, 230, 0.616);
}

button:nth-child(17):hover {
display: none;
}
button:nth-child(19):hover {
display: none;
}