Skip to content

Commit d71e5c8

Browse files
committed
style: center page 2 & resize content
1 parent 5cd7fbd commit d71e5c8

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

main.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,40 @@ adultBtn.addEventListener("click", () => {
121121
document.body.innerHTML = "";
122122
document.body.append(mainHeading);
123123

124-
const nextPage2 = document.createElement("h1");
124+
const nextPage2 = document.createElement("h2");
125125
nextPage2.textContent = "Enter Your Weigh (kg):";
126126
document.body.append(nextPage2);
127127

128+
nextPage2.style.margin = "120px 0px 10px 0px";
129+
nextPage2.style.textAlign = "center";
130+
128131
const weighttInput = document.createElement("input");
129132
weighttInput.value = "";
130133
weighttInput.type = "number";
131-
weighttInput.placeholder = "Enter Height in cm";
134+
weighttInput.placeholder = "Weight in kg";
132135
weighttInput.min = "25.4";
133136
weighttInput.max = "317.5";
134137
document.body.append(weighttInput);
135138

139+
weighttInput.style.display = "block";
140+
weighttInput.style.margin = "20px auto";
141+
weighttInput.style.width = "100px";
142+
weighttInput.style.height = "30px";
143+
weighttInput.style.borderRadius = "5px";
144+
weighttInput.style.fontSize = "small";
145+
136146
const calculateBtn = document.createElement("button");
137147
calculateBtn.textContent = "Calculate";
138148
document.body.append(calculateBtn);
139149

150+
calculateBtn.style.display = "block";
151+
calculateBtn.style.margin = "150px auto";
152+
calculateBtn.style.width = "220px";
153+
calculateBtn.style.height = "40px";
154+
calculateBtn.style.borderRadius = "15px";
155+
calculateBtn.style.fontWeight = "bold";
156+
calculateBtn.style.fontSize = "large";
157+
140158
calculateBtn.addEventListener("click", () => {
141159
document.body.innerHTML = "";
142160

0 commit comments

Comments
 (0)