File tree Expand file tree Collapse file tree 3 files changed +60
-10
lines changed
Expand file tree Collapse file tree 3 files changed +60
-10
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 11body {
2- background-image : url ("./Images/money1.jpg" );
3- background-repeat : no-repeat;
4- background-size : cover
2+
53}
64
75.container1 {
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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments