Skip to content

Commit 790312f

Browse files
committed
updated
1 parent 294a337 commit 790312f

File tree

3 files changed

+60
-10
lines changed

3 files changed

+60
-10
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset='utf-8'>
55
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
66
<title>Page Title</title>
7-
<meta name='viewport' content='width=device-width, initial-scale=1'>
7+
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
88
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
99
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
1010
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
@@ -33,7 +33,7 @@ <h3 id="expense">0.00 $</h3>
3333
<label for="basic-url" id="form-label">Amount<br>
3434
(positive for income, negative for expense)</label><br>
3535
<div class="input-group">
36-
<input type="number" class="form-control" id="input" aria-label="Amount (to the nearest dollar)">
36+
<input type="number" class="form-control" id="input">
3737
<span class="sideicon">.00</span>
3838
</div>
3939
<button class="button" type="button" id="Save" onclick="expense()">Save</button>

main.css

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
body{
2-
background-image: url("./Images/money1.jpg");
3-
background-repeat: no-repeat;
4-
background-size:cover
2+
53
}
64

75
.container1{
@@ -11,9 +9,6 @@ body{
119
background-color: rgba(255, 0, 0, 0.4);
1210
margin-top: 2rem;
1311
border: black 2px solid;
14-
-webkit-box-shadow: 10px 7px 16px 2px rgba(25,224,214,0.8);
15-
-moz-box-shadow: 10px 7px 16px 2px rgba(25,224,214,0.8);
16-
box-shadow: 10px 7px 16px 2px rgba(25,224,214,0.8);
1712
border-radius: .5rem;
1813
}
1914
#header{
@@ -111,4 +106,57 @@ input[type="number"]:focus{
111106
}
112107
.button:focus{
113108
outline: none;
109+
}
110+
111+
@media screen and (max-width: 1166px) {
112+
.container1 {
113+
width: 100%;
114+
}
115+
}
116+
117+
@media screen and (max-width: 450px) {
118+
.container1 {
119+
width: 100%;
120+
height: 90%;
121+
margin: 0;
122+
}
123+
124+
.income{
125+
width: 150px;
126+
height: 150px;
127+
margin-left: 2px;
128+
}
129+
.expense{
130+
width: 150px;
131+
height: 150px;
132+
margin-left: 150px;
133+
}
134+
}
135+
@media screen and (max-width: 540px){
136+
.income{
137+
width: 200px;
138+
height: 150px;
139+
margin-left: 30px;
140+
}
141+
.expense{
142+
width: 200px;
143+
height: 150px;
144+
margin-left: 240px;
145+
}
146+
147+
}
148+
@media screen and (max-width: 280px) {
149+
.container1 {
150+
width: 80%;
151+
height: 100%;
152+
}
153+
.income{
154+
width: 100px;
155+
height: 100px;
156+
}
157+
.expense{
158+
width: 100px;
159+
height: 100px;
160+
margin-left: -100px;
161+
}
114162
}

script.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ function expense(){
1919
closing_balance = total_amount + parseInt(input);
2020
cbalance.innerHTML = closing_balance + " .00 $" ;
2121
income.innerHTML = closing_balance + " .00 $";
22-
document.getElementById("input").value.reset();
22+
document.getElementById("input").value;
23+
document.createElement("h2");
24+
2325
}
2426

2527

@@ -34,5 +36,5 @@ function expense(){
3436
document.getElementById("cbalance").innerHTML = total_amount + " .00 $"
3537
}
3638

37-
39+
parseInt(input) = "0";
3840
}

0 commit comments

Comments
 (0)