Skip to content
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
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,28 @@
</nav>

<div class="container">
<h1>Temperature Converter</h1>
<h1 class="Heading">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>
<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>
</div>
<input type="number" id="temperature" placeholder="Enter temperature in Fahrenheit">
<button id="convert">Convert</button>
<div class="result">
<p id="result-text"></p>
</div>
</div>


</div>
<script src="script.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,5 @@ light.addEventListener('click', () => {
document.body.style.color = 'black';
document.body.style.transition = 'ease-out 0.5s';
});


37 changes: 29 additions & 8 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ body {
margin-top: 50px;
color: black;
}
.Heading{
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.container:hover {
background-color: #c5cccf;
Expand All @@ -47,7 +50,7 @@ h1 {
}

.input-container {
margin-top: 20px;
margin-top: 30px;
margin-left: 20px;
margin-right: 20px;
margin-bottom: 20px;
Expand All @@ -60,22 +63,23 @@ label {
}

input[type="number"] {
width: 100%;
padding: 10px;
margin-top: 5px;
/* width: 100%; */
padding: 15px;
margin-top: 10px;
border: 2px solid #ccc;
border-radius: 5px;
border-radius: 10px;
}

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

}

button:hover {
Expand All @@ -88,8 +92,12 @@ button:hover {
font-weight: bold;
font-size: 18px;
color: rgb(7, 0, 7);
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

}



@media (max-width: 768px) {
h1 {
font-size: 24px;
Expand All @@ -103,13 +111,26 @@ button:hover {
}

.dropdown-box {
height: 30px;
height: auto;
border-radius: 3px;
padding:10px;
text-align:left;
background-color: gray;
color:white;
font-size: 16px;


}

.no-display{
display: none;
}
#dark,#light{
cursor: pointer;
font-size: 40px;
}
#to{
margin-left: 6px;
margin-right:6px;
font-weight: bold;
}