diff --git a/index.html b/index.html new file mode 100644 index 0000000..41f65c5 --- /dev/null +++ b/index.html @@ -0,0 +1,41 @@ + + + + + + + Temp Scale Converter + + + +
+
+

Temperature Scale Converter

+
+
+

Value

+ +
+
+

Fahrenheit

+ + + + +
+
+

Celcius

+ + +
+
+

+ +
+ + + +
+ + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..41b00f5 --- /dev/null +++ b/main.js @@ -0,0 +1,22 @@ +// function celsius +// { +// var cTemp = celsius; +// var cToFahr = cTemp * 9 / 5 + 32; +// var message = cTemp+'\xB0C is ' + cToFahr + ' \xB0F.'; +// console.log(This is Celsius); +// } + +// function fahrenheit +// { +// var fTemp = fahrenheit; +// var fToCel = (fTemp - 32) * 5 / 9; +// var message = fTemp+'\xB0F is ' + fToCel + '\xB0C.'; +// console.log(This is Fahrenheit); +// } +// celcius(60); +// fahrenheit(45); + +function myfunction() { + let celsius = (document.getElementById('value').value - 32) * 5/9; + document.getElementById('celciusformula').innerHTML = celsius; +} diff --git a/style.css b/style.css new file mode 100644 index 0000000..fd0958e --- /dev/null +++ b/style.css @@ -0,0 +1,49 @@ + +main { + width: 100%; + height: 100vh; +} + +header { + display: flex; + justify-content: center; + padding-top: 30px; +} + + + +.fahrenheit{ + text-align: center; + 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; +} + +.celciusName { + text-align: center; +} + +.celcius { + text-align: center; +} \ No newline at end of file