From e8de8f3cd033cf53edc3bb6cb8849ff1667e62f7 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 12 Jan 2021 19:03:57 -0500 Subject: [PATCH] temp converter complete --- function.js | 4 ++++ index.html | 38 ++++++++++++++++++++++++++++++++++++++ style.css | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 function.js create mode 100644 index.html create mode 100644 style.css diff --git a/function.js b/function.js new file mode 100644 index 0000000..b3072fb --- /dev/null +++ b/function.js @@ -0,0 +1,4 @@ +function myfunction() { + let celcius = (document.getElementById('value').value - 32) * 5/9; + document.getElementById('celciusformula').innerHTML = celcius; +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..d586ea4 --- /dev/null +++ b/index.html @@ -0,0 +1,38 @@ + + + + + + + Temp Scale Converter + + +
+
+

Temperature Scale Converter

+
+ +
+

Value

+
+ +
+

Fahrenheit

+ + +
+ +
+

Celsius

+
+ +
+

+
+
+ + + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..8db037d --- /dev/null +++ b/style.css @@ -0,0 +1,42 @@ +/* { + margin: 0; + padding: 0; + font-family: sans-serif; +} +*/ +main { + width: 100%; + height: 100vh; +} +header { + display: flex; + justify-content: center; + padding-top: 30px; +} + + +.Fahrenheit{ + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + margin: 10px; +} +.input { + margin: 0 100px; + border-radius: 5px; + padding: 5px; + border: solid; +} +body { + text-align: center; + border-style: solid; + margin: 50px; +} +.value { + text-align: center; + margin: 10px; +} +.celsius { + text-align: center; +} \ No newline at end of file