Skip to content

Commit

Permalink
Merge pull request #207 from supr1yo/BMI-Calculator
Browse files Browse the repository at this point in the history
[KWoC] Refactor: BMI Calculator
  • Loading branch information
shrey141102 committed Jan 6, 2024
2 parents 53a3928 + 534b8e0 commit 2bccb41
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
12 changes: 6 additions & 6 deletions BMI calculator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ <h1 class="popupheading2">38.3</h1>
<div class="mainContainer">
<h1 class="heading">Body Mass</h1>
<h1 class="heading1">Index</h1>
<h1 class="subheading">Gender:</h1>
<h1 class="subheading">Gender</h1>
<select name="gender" id="gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Male">Male ♂️</option>
<option value="Female">Female ♀️</option>
</select>
<h1 class="subheading">Height:</h1>
<input class="heightInput" placeholder="Enter your height in cm" type="number"/><span class="symbol">CM</span>
<h1 class="subheading">Height <span id="symbol">(cm)</span></h1>
<input class="heightInput" placeholder="Enter in centimeter" type="number"/>
<div class="ageAndweightcontainer">
<div class="EachContainer">
<h1 class="subheading">Age</h1>
<input class="AgeInput" type="number"/>
<input class="AgeInput" placeholder="in years" type="number"/>
</div>
<div class="EachContainer">
<h1 class="subheading">Weight</h1>
Expand Down
34 changes: 24 additions & 10 deletions BMI calculator/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/* Disable increment/decrement arows from Number input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

input[type=number]{
-moz-appearance: textfield;
}


body{
display: flex;
align-items: center;
Expand Down Expand Up @@ -66,6 +78,10 @@ body{
margin: 0px;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
#symbol {
font-family: 'Courier New', Courier, monospace;
font-size: 18px;
}
.heading{
margin-top: 10px;
font-size: 40px;
Expand All @@ -78,10 +94,10 @@ body{
font-weight: 100;
}
.subheading{
font-size: 30px;
text-decoration: underline;
font-weight: 100;
font-size: 25px;
font-weight: 80;
}

select {
cursor: pointer;
display: inline-block;
Expand All @@ -100,13 +116,9 @@ select {
font-size: 20px;
color: black;
}
.symbol{
margin-left: 20px;
font-size: 30px;
font-weight: 100;
}

.heightInput{
width: 80%;
width: 95%;
border: 2px solid rgba(255, 0, 0, 0.386);
height: 40px;
border-radius: 10px;
Expand All @@ -125,8 +137,10 @@ select {
align-items: center;
}
.WeightInput,.AgeInput{
font-size: 60px;
font-size: 20px;
text-align: center;
width: 50%;
height: 50px;
border: 2px solid rgba(255, 0, 0, 0.386);
border-radius: 10px;
}
Expand Down

0 comments on commit 2bccb41

Please sign in to comment.