Skip to content

Commit 0ffe9f6

Browse files
authored
Update calculator.html
1 parent 6df3ff0 commit 0ffe9f6

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

calculator.html

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
margin-bottom: 10px;
2828
text-align:center;
2929
width: 210px;
30-
color:green;
30+
color:rgb(0, 0, 0);
3131
border: solid black 2px;
32+
padding: 3px 33px 4px 24px;
33+
3234
}
3335

3436
input[type="button"]
3537
{
36-
background-color:green;
38+
background-color:rgb(238, 207, 219);
3739
color: black;
3840
border: solid black 2px;
3941
width:100%
@@ -45,26 +47,31 @@
4547
border: solid black 2px;
4648
width:100%
4749
}
50+
.border{
51+
border: 2px;
52+
color: black;
53+
}
4854
</style>
4955
</head>
5056
<!-- create table -->
5157
<body>
52-
<div class = title >HTML Calculator</div>
53-
<table border="1">
54-
<tr>
55-
<td colspan="3"><input type="text" id="result"/></td>
56-
<!-- clr() function will call clr to clear all value -->
57-
<td><input type="button" value="c" onclick="clr()"/> </td>
58-
</tr>
59-
<tr>
60-
<!-- create button and assign value to each button -->
61-
<!-- dis("1") will call function dis to display value -->
62-
<td><input type="button" value="1" onclick="dis('1')"/> </td>
63-
<td><input type="button" value="2" onclick="dis('2')"/> </td>
64-
<td><input type="button" value="3" onclick="dis('3')"/> </td>
65-
<td><input type="button" value="/" onclick="dis('/')"/> </td>
66-
</tr>
67-
<tr>
58+
<div class="border">
59+
<div class = title >HTML Calculator</div>
60+
<table border="1">
61+
<tr>
62+
<td colspan="3"><input type="text" id="result"/></td>
63+
<!-- clr() function will call clr to clear all value -->
64+
<td><input type="button" value="c" onclick="clr()"/> </td>
65+
</tr>
66+
<tr>
67+
<!-- create button and assign value to each button -->
68+
<!-- dis("1") will call function dis to display value -->
69+
<td><input type="button" value="1" onclick="dis('1')"/> </td>
70+
<td><input type="button" value="2" onclick="dis('2')"/> </td>
71+
<td><input type="button" value="3" onclick="dis('3')"/> </td>
72+
<td><input type="button" value="/" onclick="dis('/')"/> </td>
73+
</tr>
74+
<tr>
6875
<td><input type="button" value="4" onclick="dis('4')"/> </td>
6976
<td><input type="button" value="5" onclick="dis('5')"/> </td>
7077
<td><input type="button" value="6" onclick="dis('6')"/> </td>
@@ -83,6 +90,7 @@
8390
<td><input type="button" value="=" onclick="solve()"/> </td>
8491
<td><input type="button" value="*" onclick="dis('*')"/> </td>
8592
</tr>
86-
</table>
87-
</body>
88-
</html>
93+
</div>
94+
</table>
95+
</body>
96+
</html>

0 commit comments

Comments
 (0)