diff --git a/Calculators/Weather-Calculator/style.css b/Calculators/Weather-Calculator/style.css index 26b4b65b6..7217a82a8 100644 --- a/Calculators/Weather-Calculator/style.css +++ b/Calculators/Weather-Calculator/style.css @@ -5,37 +5,46 @@ body { align-items: center; height: 100vh; margin: 0; - background: radial-gradient(#a07eff,#ffffff) ; + background: radial-gradient(#a07eff, #ffffff); } .container { text-align: center; width: 30%; + max-width: 100%; background: #fff; padding: 20px; border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } -.container h1{ - font-family:'Lucida Sans', Arial, sans-serif; - color:#4f1591; +.container h1 { + font-family: 'Lucida Sans', Arial, sans-serif; + color: #4f1591; font-size: 30px; + margin-bottom: 20px; } -.container h2, h3, h4{ +.container h2, +h3, +h4 { font-size: 15px; text-align: left; margin-left: 10px; + margin-bottom: 10px; } input[type="number"] { display: block; - width: 90%; + width: 100%; + max-width: calc(100% - 10px); text-align: center; padding: 10px; - margin: 10px 5px; + margin: 10px 0; border: 1px solid #ccc; border-radius: 50px; + font-size: 16px; + box-sizing: border-box; } input[type="number"]:hover { @@ -60,8 +69,10 @@ button:hover { .resultsContainer { background-color: rgb(255, 230, 221); border-radius: 8px; - border-right:3px solid #484848; - border-bottom:3px solid #484848; + border-right: 3px solid #484848; + border-bottom: 3px solid #484848; + padding: 20px; + margin-top: 20px; } .results { @@ -72,9 +83,73 @@ button:hover { .results p { display: block; - width: 90%; + width: 100%; + max-width: calc(100% - 8px); text-align: left; padding: 8px; - margin: 10px 10px; + margin: 10px 0; border-radius: 50px; + background-color: #fff; + border: 1px solid #ccc; + box-sizing: border-box; +} + +/* Media queries for responsiveness */ + +/* For screens smaller than 1024px (larger tablets and small desktops) */ +@media only screen and (max-width: 1024px) { + .container { + width: 50%; + } +} + +/* For screens smaller than 768px (tablets and mobiles) */ +@media only screen and (max-width: 768px) { + .container { + width: 80%; + } + + input[type="number"] { + width: calc(100% - 10px); + } + + button { + width: calc(100% - 10px); + } + + .resultsContainer { + width: auto; + } + + .results p { + width: calc(100% - 10px); + } } + +/* For screens smaller than 480px (mobiles) */ +@media only screen and (max-width: 480px) { + .container { + width: 90%; + padding: 15px; + } + + input[type="number"] { + font-size: 14px; + padding: 8px; + } + + button { + font-size: 14px; + padding: 8px; + } + + .resultsContainer { + padding: 8px; + width:auto; + } + + .results p { + font-size: 12px; + padding: 6px; + } +} \ No newline at end of file