Skip to content

Commit 22c0fee

Browse files
committed
Refactor age calculator layout and improve form structure
1 parent ea977e5 commit 22c0fee

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Sprint-1/prep/Age/simpleExampleOfEventlistener.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414

1515

1616
margin-top: 45vh;
17-
border: 2px red solid;
17+
border: 2px rgb(20, 16, 16) solid;
1818
display: flex ;
1919
flex-direction:column;
2020
gap: 20px;
2121
justify-content: space-around;
2222
padding: 20px;
2323
align-items: center;
24+
width: 50%;
25+
margin-left: auto;
26+
margin-right: auto;
27+
border-radius: 10px;
2428

2529
}
2630
.btn_container{
@@ -67,10 +71,14 @@ <h1>Simple Example of Event Listener</h1>
6771

6872
// Add an event listener to the button
6973
buttonRed.addEventListener("click", function() {
74+
bg.style.color="black";
75+
7076
bg.style.backgroundColor = "red";
7177
});
7278
buttonBlue.addEventListener("click",function(){
7379
bg.style.backgroundColor="blue"
80+
bg.style.color="white"
81+
bg.style.border="2px solid white"
7482
})
7583

7684

0 commit comments

Comments
 (0)