Skip to content
Merged
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
65 changes: 28 additions & 37 deletions Calculator/sushil-2803/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,37 @@
<html>

<head>
<link rel='stylesheet' type='text/css' href="style.css">
<title>Calculator</title>
<link rel='stylesheet' type='text/css' href="./style.css">
<title>Calculator</title>
</head>


<body>
<div class="calculator">
<div class="input" id="input"></div>
<div class="buttons">
<div class="operators">
<div>+</div>
<div>-</div>
<div>&times;</div>
<div>&divide;</div>
</div>
<div class="leftPanel">
<div class="numbers">
<div>7</div>
<div>8</div>
<div>9</div>
</div>
<div class="numbers">
<div>4</div>
<div>5</div>
<div>6</div>
</div>
<div class="numbers">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
<div class="numbers">
<div>0</div>
<div>.</div>
<div id="clear">C</div>
</div>
<div class="calculator">
<div class="input" id="input"></div>
<div class="buttons">

<div class="o1 o">+</div>
<div class="o2 o">-</div>
<div class="multiply_sign o3 o">&times;</div>
<div class="o4 o">&divide;</div>
<div class="n7 n">7</div>
<div class="n8 n">8</div>
<div class="n9 n">9</div>
<div class="n4 n">4</div>
<div class="n5 n">5</div>
<div class="n6 n">6</div>
<div class="n1 n">1</div>
<div class="n2 n">2</div>
<div class="n3 n">3</div>
<div class="n11 n">0</div>
<div class="n10 g n">.</div>
<div id="clear" class="n12 n g">C</div>
<div class="equal eq" id="result">=</div>
</div>
<div class="equal" id="result">=</div>
</div>
</div>
<script src="use.js"></script>
</div>
<script src="use.js"></script>
</body>
</html>

</html>
155 changes: 133 additions & 22 deletions Calculator/sushil-2803/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 500px;
margin: 4% auto;
height: 800px;
display: flex;
align-items: center;
justify-content: center;
overflow-y: hidden;
width: 100%;
font-family: 'Source Sans Pro', sans-serif;
letter-spacing: 5px;
font-size: 1.8rem;
Expand All @@ -10,16 +19,29 @@ body {
}

.calculator {
padding: 20px;
-webkit-box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.2);
border-radius: 1px;
border-radius: 2rem;
background-color: rgb(225, 225, 255);
height: 80%;
width: min(400px,95%);
display: flex;
justify-content:center;
align-items: center;
box-shadow: rgb(38, 57, 77) 0rem 1rem 1.5rem -0.5rem;
flex-direction: column;

/* padding: 20px; */


}

.input {
width: 90%;
height: 35%;
border-radius: 1.5rem;
background-color: white;
border: 1px solid #ddd;
border-radius: 1px;
height: 60px;


padding-right: 15px;
padding-top: 10px;
text-align: right;
Expand All @@ -35,7 +57,99 @@ body {
box-shadow: inset 0px 1px 4px 0px rgba(0, 0, 0, 0.2);
}

.buttons {}
.buttons {
height: 60%;
width: 90%;
display: grid;
grid-template-rows:repeat(5,1fr);
grid-template-columns: repeat(4,1fr);
justify-content: space-around;
align-items: center;
grid-template-areas:
"o1 o2 o3 o4"
"n1 n2 n3 eq"
"n4 n5 n6 eq"
"n7 n8 n9 eq"
"n10 n11 n12 eq";
}
.o,.n,.eq,.g{
display: flex;
justify-content: center;
align-items: center;
justify-self: center;
height: 90%;
width: 90%;
font-weight: 600;
border-radius: 1rem;
background-color: white;
align-self: center;
}
.o{
/* height: 100%; */
/* width: 96%; */
background-color: white;
color: #59a800;

/* background-color: #c5d8f6; */
border-radius: 1rem;


}
.g{
color: rgb(249, 165, 19);
}
.o1{
grid-area: o1;
}
.o2{
grid-area: o2;
}
.o3{
grid-area: o3;
}
.o4{
grid-area: o4;
}
.n1{
grid-area: n1;
}
.n2{
grid-area: n2;
}
.n3{
grid-area: n3;
}
.n4{
grid-area: n4;
}
.n5{
grid-area: n5;
}
.n6{
grid-area: n6;
}
.n7{
grid-area: n7;
}
.n8{
grid-area: n8;
}
.n9{
grid-area: n9;
}
.n10{
grid-area: n10;
}
.n11{
grid-area: n11;
}
.n12{
grid-area: n12;
}
.eq{
grid-area: eq;
}


.operators {}

Expand Down Expand Up @@ -64,7 +178,8 @@ body {
}

.leftPanel {
display: inline-block;

width: 100%;
}

.numbers div {
Expand Down Expand Up @@ -93,26 +208,22 @@ body {

div.equal {
display: inline-block;
border: 1px solid #3079ED;
border-radius: 1px;
width: 17%;
height: 97%;

text-align: center;
padding: 127px 10px;
margin: 10px 6px 10px 0;
vertical-align: top;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: #FFF;
background-color: #4d90fe;
background-color: #3f45ff;
transition: all .2s ease-in-out;
}

div.equal:hover {
background-color: #307CF9;
-webkit-box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.2);
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.2);
border-color: #1857BB;
background-color: #242ef6;
}

div.equal:active {
font-weight: bold;
}
}
Loading