Skip to content

Commit 890fe99

Browse files
committed
fixed the hover effect on new pet page akshitagupta15june#1563
1 parent b05c72a commit 890fe99

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

index.html

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
id="header">
3232
<div class="flex flex-row items-center md:flex-row md:items-center p-2" id="logo">
3333
<span class="mission-1 mission-dark"> Saving Lives </span>
34-
<a class="logo-border" href="index.html">
34+
<a class="logo-border remover" href="index.html">
3535
<img class="rounded-full logo-size" src="./Assets/Images/logo.jpg" alt="logo" />
3636
</a>
3737
<span class="mission-2 mission-dark"> Saving Animals </span>
@@ -67,12 +67,12 @@ <h1 class="text-4xl text_2 text-center md:text-left md:ml-12 uppercase font-ser
6767
</button>
6868
<nav class="">
6969
<div class="hidden w-full lg:block z-2" id="navbar">
70-
<ul class="w-[100vw] h-1/2 top-0 right-0 p-8 lg:p-4 mt-12 lg:mt-0 text-center text-base md:text-md space-y-4 lg:space-y-0 lg:space-x-5 lg:static lg:w-auto flex flex-col rounded-lg items-center lg:items-center lg:bg-transparent lg:border-0 lg:flex-row justify-between">
70+
<ul class="w-[100vw] h-1/2 top-0 right-0 p-4 lg:p-4 mt-12 lg:mt-0 text-center text-base md:text-md space-y-4 lg:space-y-0 lg:space-x-5 lg:static lg:w-auto flex flex-col rounded-lg items-center lg:items-center lg:bg-transparent lg:border-0 lg:flex-row justify-between">
7171
<div class="nav-item">
7272
<li>
7373
<a
7474
href="#meet"
75-
class="lg:p-3 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
75+
class="lg:p-1 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
7676
>Meet Pets</a
7777
>
7878

@@ -82,43 +82,43 @@ <h1 class="text-4xl text_2 text-center md:text-left md:ml-12 uppercase font-ser
8282
<a
8383

8484
href="#About"
85-
class="text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
85+
class="lg:p-1 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
8686
>About Us</a
8787
>
8888
</li>
8989
<li>
9090
<a
9191
href="./news.html"
92-
class="text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
92+
class="lg:p-1 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
9393
>Pet News</a
9494
>
9595
</li>
9696
<li>
9797
<a
9898
href="./blog.html"
99-
class="text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
99+
class="lg:p-1 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
100100
>Blogs</a
101101
>
102102
</li>
103103
<li>
104104
<a
105105
href="./donate.html"
106-
class="text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
106+
class="lg:p-1 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
107107
>Donate</a
108108
>
109109
</li>
110110

111111
<li>
112112

113113
<div x-data="{ open: false }" @mouseleave="open = false" class="relative">
114-
<a @mouseover="open = true" class="text-custom-heading flex font-bold hover:underline underline-offset-4 turn-red-hover navbar-item w-full">
114+
<a @mouseover="open = true" class=" lg:p-1 text-custom-heading flex font-bold underline-offset-4 turn-red-hover navbar-item">
115115
Support Us
116116
<svg xmlns="http://www.w3.org/2000/svg" width="14px" height="14px" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="mt-1">
117117
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
118118
</svg>
119119
</a>
120-
<div x-show="open" class="z-20 absolute -left-1 w-[7.5rem] py-2 bg-gray-100 rounded-md shadow-xl">
121-
<a href="volunteer.html" class="block px-4 py-2 text-base text-gray-300 text-gray-700 hover:bg-gray-400 hover:text-white">Become a Volunteer</a>
120+
<div x-show="open" class="z-20 absolute -left-1 w-[7.5rem] py-2 bg-gray-100 rounded-md shadow-xl hover:bg-gray-400 ">
121+
<a href="volunteer.html" class=" remover block px-4 py-2 text-base text-gray-300 text-gray-700 hover:text-white">Become a Volunteer</a>
122122
</div>
123123
</div>
124124

@@ -127,15 +127,14 @@ <h1 class="text-4xl text_2 text-center md:text-left md:ml-12 uppercase font-ser
127127
<li>
128128
<a
129129
href="./reportstary.html"
130-
class="text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
130+
class="lg:p-1 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item"
131131
>SOS Report</a
132132
>
133133
</li>
134134
<li>
135-
<a href="#contact">
136-
<button
137-
class="inline-flex items-center bg-header-orange-light border-0 py-2 lg:py-2 text-choco text-base px-2 focus:outline-none text_4 font-bold rounded mt-4 md:mt-0 hover:translate-x-2 transition-transform"
138-
>
135+
<a href="#contact"
136+
class="lg:p-1 text-custom-heading font-bold underline-offset-4 turn-red-hover navbar-item remover">
137+
<button class="flex inline-flex items-center bg-header-orange-light border-0 py-2 lg:py-2 text-choco text-base px-2 focus:outline-none text_4 font-bold rounded mt-4 md:mt-0 hover:bg-hover-choco hover:translate-x-2 transition-transform text-light-mode">
139138
Contact Us
140139
<svg
141140
fill="none"
@@ -152,8 +151,8 @@ <h1 class="text-4xl text_2 text-center md:text-left md:ml-12 uppercase font-ser
152151
</a>
153152
</li>
154153
<li>
155-
<a id="theme-toggle">
156-
<i class="ri-sun-line turn-yellow-hover light-theme" id="switch"></i>
154+
<a id="theme-toggle" class="remover">
155+
<i class="ri-sun-line light-theme" id="switch"></i>
157156
</a>
158157
</li>
159158
<!-- google translate -->

navbar.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ a:hover::after {
192192
a:hover {
193193
color: hwb(37 38% 0%);
194194
cursor: pointer;
195-
transform: scale(1.3);
195+
196196
}
197197

198198
.nav-items div{
@@ -201,4 +201,12 @@ a:hover {
201201
cursor: pointer;
202202
transition: 5s;
203203

204+
}
205+
206+
.remover::after{
207+
content: none;
208+
}
209+
210+
.x-text :hover{
211+
background-color:#8b4513;
204212
}

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module.exports = {
3434
},
3535
colors: {
3636
'light-blue': '#B7DFF8',
37+
'hover-choco': '#8b4513',
3738
}
3839
},
3940
},

0 commit comments

Comments
 (0)