Minutes to Hours Converter

Developer
Size
2,532 Kb
Views
30,360

How do I make an minutes to hours converter?

What is a minutes to hours converter? How do you make a minutes to hours converter? This script and codes were developed by Joe Warren on 04 July 2022, Monday.

Minutes to Hours Converter Previews

Minutes to Hours Converter - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Minutes to Hours Converter</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html lang="en-us"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta charset="utf-8"/> <link rel="stylesheet" href="minuteConverter.css"> <title>Minutes to Hours converter</title> </head> <body> <h1 class="title">Minutes to Hours Converter</h1> <h3 class="subTitle"> Enter number of minutes to convert to hours </h3> <br> <form> <fieldset class="minutesToHours"> <label> <b>Minutes</b> <input type="number" id="userInput" name="duration" min="1" autofocus> <!-- requires user to input or choose a number at least 1 --> </label> </fieldset> <fieldset class="buttonAction"> <input class="btn" onclick="outputHours()" type="submit" name="convert" value="Convert"> </fieldset> </form>
<div class = footer> Copyright © 2017 All Rights Reserved.</div> <script> function outputHours() { var minutes=document.getElementById("userInput").value; var hours=minutes/60; if (minutes == 60) { alert(minutes + " minutes = " + hours + " hour"); //If input is 60 minutes, outputs 'hour' since 1 hour is singular } else { alert(minutes + " minutes = " + hours + " hours"); //outputs 'hours' for anything that is not 60 minutes } } </script> </body> </html>
</body>
</html>

Minutes to Hours Converter - Script Codes CSS Codes

body { position: center; margin: auto; margin-top:30px; padding: 20px; max-width: 300px; height: 350px; border: 2px solid black; border-radius:20px;
}
form { background: radial-gradient(white, AliceBlue, lightblue); margin: 0 auto; max-width:300px; border: 1px solid #c6c7cc; border-radius: 5px; font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif; overflow: hidden; text-align:center;
}
fieldset { border: 0; margin: 0; padding: 0;
}
input { border-radius: 5px; font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0; text-align:center;
}
.minutesBox { padding: 20px 20px 0 20px; width: 238px;
}
.minutesBox label { color: #395870; display: block; font-weight: bold; margin-bottom: 20px;
}
.minutesBox input { background: #fff; border: 1px solid #c6c7cc; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .1); color: #636466; padding: 6px; margin-top: 6px; width: 100%;
}
.buttonAction { background: #f0f0f2; border-top: 1px solid #c6c7cc; padding: 20px;
}
.buttonAction .btn { background: linear-gradient(#49708f, #293f50); border: 0; color: #fff; cursor: pointer; font-weight: bold; text-align:center; padding: 8px 16px;
}
.buttonAction label { color: #7c7c80; font-size: 12px; float: left; margin: 10px 0 0 20px;
}
.title { text-shadow: 1px 1px; text-align:center; color:midnightblue; font-family:Verdana, Geneva, Tahoma, sans-serif
}
.subTitle { text-align:center; color:#000; font-family:Verdana, Geneva, Tahoma, sans-serif
}
.footer { position: fixed; right: 0; bottom: 0; left: 0; padding: 1rem; background-color: #efefef; text-align: center;
}
Minutes to Hours Converter - Script Codes
Minutes to Hours Converter - Script Codes
Home Page Home
Developer Joe Warren
Username MightyJoeW
Uploaded July 04, 2022
Rating 3
Size 2,532 Kb
Views 30,360
Do you need developer help for Minutes to Hours Converter?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Joe Warren (MightyJoeW) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!