From c88dab7174d40021926b0c9ca5adaf49c052981b Mon Sep 17 00:00:00 2001 From: PUNEET TIWARI Date: Mon, 3 Jun 2024 17:02:50 +0530 Subject: [PATCH] button size of previous button is very large --- Calculators/Antilog-Calculator/index.html | 6 ++-- Calculators/Antilog-Calculator/style.css | 44 +++++++++++++++++------ 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/Calculators/Antilog-Calculator/index.html b/Calculators/Antilog-Calculator/index.html index 2ba429acc..52a594c34 100644 --- a/Calculators/Antilog-Calculator/index.html +++ b/Calculators/Antilog-Calculator/index.html @@ -18,12 +18,12 @@

Antilog Calculator

Calculate the antilog of any number to any base:

-
+
-

INVALID INPUT *Base can't be 1*
+

INVALID INPUT *Base can't be 1*
-

Result:

+

Result

diff --git a/Calculators/Antilog-Calculator/style.css b/Calculators/Antilog-Calculator/style.css index d7d66d59b..d5e05d85f 100644 --- a/Calculators/Antilog-Calculator/style.css +++ b/Calculators/Antilog-Calculator/style.css @@ -45,16 +45,40 @@ body { #button { margin-top: 20px; - padding: 20px 20px 20px 20px; - font-size: 20px; - border: solid 3px black; - border-radius: 5px; background-color: rgb(113, 105, 201); - transition: background-color 0.3s ease, box-shadow 0.3s ease; + color: white; + width: fit-content; + padding: 0.8rem 2rem; + box-shadow: 5px 5px 7px 0px #0000003f; + font-size: 18px; + cursor: pointer; + transition: all 0.5s; + font-weight: 500; + border: solid 3px transparent; + position: relative; + z-index: 1; +} +button::before{ + content:""; + position: absolute; + background-color: rgb(175, 169, 169); + top: 0px; + left: 0; + right: 0; + bottom: 0px; + z-index: -1; + transform: scaleX(0); + transform-origin: left; + transition: all 0.8s; +} +button:hover::before{ + transform: scaleX(1); +} +button:hover{ + border: solid 3px #6c65cd; + color: black; +} +h4{ + color: #6376e0; } -#button:hover{ - border: none; - background-color: white; - box-shadow: 3px 3px 3px rgb(113, 105, 201); -} \ No newline at end of file