Skip to content

Commit

Permalink
chore: applied css to length
Browse files Browse the repository at this point in the history
  • Loading branch information
parasrajain committed Mar 24, 2024
1 parent dc79401 commit b7c30e3
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 38 deletions.
137 changes: 137 additions & 0 deletions Unit Converter/CSS/length.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
body {
margin: 0;
font-family: Arial, sans-serif;
background-color: #f5f5f5;
}

.bg {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
background-image: url('../HTML/images/pexels-ave-calvar-martinez-5038394.jpg');
background-size: cover;
background-position: center;
}

.containment {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
opacity: 95%;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 15px;
padding: 20px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
max-width: 800px;
width: 80%;
margin: 20px;
}

.box {
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
padding: 20px;
max-width: 600px;
width: 100%;

animation: fadeInDown 0.5s ease-in-out;

}

#desc, #desc0 {
text-align: center;
margin: 0 0 20px;
font-weight: 850;
}

#desc {
font-size: 50px;
}

#desc0 {
font-size: 25px;

}

#optionfr {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
gap: 10px;
}

#conversion {
width: 50px;
border-radius: 50px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
#conversion:hover{
transform: scale(1.1);
transition: all 0.3s ease;
}

.form-select, .form-control {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 15px;
font-weight: 700;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.form-select {
width: 50%;
}

.form-select:hover, .form-control:hover {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
transform: scale(1.02);


}

#value {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
}

.form-control {
width: 48%;
margin-bottom: 20px;
}

@media screen and (max-width: 768px) {
.box {
width: 90%;
}
#desc {
font-size: 22px;
}

#desc0 {
font-size: 15px;
}
.form-select, .form-control {
font-size: 15px;
}
}

@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
Binary file added Unit Converter/HTML/images/LengthBackground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Unit Converter/HTML/images/LengthConversion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 35 additions & 38 deletions Unit Converter/HTML/length.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,43 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Length</title>
<link rel="stylesheet" href="../CSS/length.css">
</head>
<body>


<p id="desc">This is a simple unit converter.</p>

<p>You can also convert from one unit to another unit.</p>

<div class="container-fluid ">
<div class="row justify-content-evenly">
<select id="selectfr" name="slfrom" class="form-select slfr" aria-label="Default select example">
<option value="0">Select unit you are converting from</option>
<option value="1">Kilometer(km)</option>
<option value="2">Meter (m)</option>
<option value="3">Centimeter (cm)</option>
<option value="4">Millimeter (mm)</option>
</select>
<select id="selectto" name="slto" class="form-select slto" aria-label="Default select example">
<option value="0">Select unit you are converting to</option>
<option value="1">Kilometer(km)</option>
<option value="2">Meter (m)</option>
<option value="3">Centimeter (cm)</option>
<option value="4">Millimeter (mm)</option>
</div>
</div>
</select>
<form>
<div class="container-fluid">
<div class="row justify-content-evenly">
<form>
<input id="select1fr" name="etfrom" class="form-control" type="number" placeholder="Enter value to be changed" value="" aria-label="default input example">
<input id="select1to" name="etto" class="form-control" type="number" placeholder="Result" value="" aria-label="default input example">

</form>
<div class="bg">
<div class="containment">
<p id="desc">This is a simple unit converter.</p>
<p id="desc0">You can also convert from one unit to another unit.</p>
<div class="box">
<div class="container-fluid">
<div id="optionfr">
<select id="selectfr" name="slfrom" class="form-select slfr" aria-label="Default select example">
<option value="0"> From</option>
<option value="1">Kilometer(km)</option>
<option value="2">Meter (m)</option>
<option value="3">Centimeter (cm)</option>
<option value="4">Millimeter (mm)</option>
</select>
<img id="conversion" src="images/LengthConversion.png">
<select id="selectto" name="slto" class="form-select slto" aria-label="Default select example">
<option value="0">To</option>
<option value="1">Kilometer(km)</option>
<option value="2">Meter (m)</option>
<option value="3">Centimeter (cm)</option>
<option value="4">Millimeter (mm)</option>
</select>
</div>
</div>
<form>
<div class="container-fluid" id="value">
<form>
<input id="select1fr" name="etfrom" class="form-control" type="number" placeholder="Enter value to be changed" value="" aria-label="default input example">
<input id="select1to" name="etto" class="form-control" type="number" placeholder="Result" value="" aria-label="default input example">
</form>
</div>
</form>
</div>
</div>
</div>


</form>


</div>
</body>
</html>

0 comments on commit b7c30e3

Please sign in to comment.