Skip to content

enchanced the gui #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 34 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand All @@ -19,29 +20,42 @@

<div class="container">

9
<h1>Temperature Converter</h1>
<div class="input-container">
<select id="conversion-from-type" class="dropdown-box">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius">Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
<span id="to">to</span>
<select id="conversion-to-type" class="dropdown-box">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius" selected>Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
<input type="number" id="temperature" placeholder="Enter temperature in Fahrenheit">

<div id="contele">
<h1>Temperature Converter</h1>
</div>


<div id="contele" class="input-container">
<div>
<select id="conversion-from-type" class="dropdown-box unit">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius">Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
</div>
<span id="to" class="unit">to</span>
<select id="conversion-to-type" class="dropdown-box unit">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius" selected>Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
</div>

<div id="contele">
<input type="number" id="temperature" placeholder="Enter temperature">
<button id="convert">Convert</button>
<div class="result">
</div>

<div class="result">
<p id="result-text"></p>
</div>
</div>
</div>
<script src="script.js"></script>

</body>
<script src="script.js"></script>
</body>

</html>
53 changes: 37 additions & 16 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ body {

.container {
background-color: rgba(245, 242, 242, 0.959);
padding: 20px;
padding: 10px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
margin: 0 auto;
height: 250px;
max-width: 400px;
height: 300px;
max-width: 700px;
cursor: pointer;
transition: background-color 0.3s, transform 0.3s;
margin-top: 50px;
color: black;
/* padding: 75px 50px; */
}

.container:hover {
Expand All @@ -43,14 +44,25 @@ body {
}

h1 {
color: #090909;
color: #303235;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 50px;
}

.input-container {
margin-top: 20px;
margin-left: 20px;
margin-right: 20px;
margin-bottom: 20px;

margin: 40px 40px;
display: flex;
justify-content: center;
align-items: center;
padding: 10px 10px;
justify-content: space-around;
}

#unit
{
margin-right: 30%;

}

label {
Expand All @@ -59,6 +71,13 @@ label {
margin-bottom: 10px;
}

.dropdown-box {
height: 50px;
border-radius: 5px;
text-align: center;
padding: 10px 10px;
}

input[type="number"] {
width: 100%;
padding: 10px;
Expand All @@ -68,29 +87,34 @@ input[type="number"] {
}

button {
background-color: #007BFF;
background-color: #303235;
color: #fff;
border: none;
padding: 10px 20px;
cursor: pointer;
margin-top: 10px;
border-radius: 5px;
transition: background-color 0.3s, transform 0.2s;
transition : background-color 0.3s, transform 0.2s;

}

button:hover {
background-color: #0056b3;
transform: translateY(-3px);
background-color: #007BFF;
}

.result {
margin-top: 20px;
margin-top: 40px;
font-weight: bold;
font-size: 18px;
color: rgb(7, 0, 7);
}

#temperature
{
margin-top: 2px;
width:40%;
}
@media (max-width: 768px) {
h1 {
font-size: 24px;
Expand All @@ -103,10 +127,7 @@ button:hover {

}

.dropdown-box {
height: 30px;
border-radius: 3px;
}


.no-display{
display: none;
Expand Down