Skip to content

Commit 14114ae

Browse files
Merge pull request #1644 from ak-sh-at/calc
Loan calculator modified
2 parents 4ec0bff + de77078 commit 14114ae

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

Projects/Loan-calculator/loancalculator.css

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
body{
2-
background-color: rgb(238, 164, 164)
2+
background-color: rgb(238, 164, 164);
3+
height:90vh;
4+
width:100%;
5+
display: flex;
6+
flex-direction: column;
7+
justify-content: space-between;
8+
align-items: center;
39
}
410

511
#loancal {
6-
width: 375px;
7-
height: 295px;
12+
width: 400px;
13+
height: 375px;
814
background-color:#000;
915
color: #fff;
10-
margin-left: 500px;
1116
margin-top: 135px;
12-
padding-left: 90px;
13-
padding-top: 20px;
1417
border-radius: 1.5rem;
18+
display: flex;
19+
flex-direction: column;
20+
justify-content: space-evenly;
21+
align-items: center;
1522
}
1623

1724
.button {
@@ -41,8 +48,12 @@ h1 {
4148
font-size:40px;
4249
}
4350

44-
footer
51+
@media(max-width:383px)
4552
{
46-
margin-top: 200px;
47-
margin-left: 630px;
53+
body{
54+
width:fit-content;
55+
}
56+
#loancal{
57+
margin-right: 8px;
58+
}
4859
}

Projects/Loan-calculator/loancalculator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ function computeLoan(){
88
//regedit to add a comma after every three digits
99
payment = payment.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); //\B looks for a word boundary, ? says what to look for, \d looks for 3 digits in a row
1010
document.querySelector('#payment').innerHTML = `Monthly Payment = ${payment}`
11-
document.getElementById("payment").style.color = "black";
11+
document.getElementById("payment").style.color = "white";
1212
}

0 commit comments

Comments
 (0)