Jump to content

BACKGROUND COLOUR AND DROPDOWN SHADOW ON HOVER ON LINKS IN HEADER NAV BAR

Go to solution Solved by Lesum,

Recommended Posts

Hi!

Website: www.visual-ess.com
Password: 2023

I want to add a white background colour to the links in my header with a black dropdown shadow on hover. Does anybody know the CSS code to do this? I have attached a screenshot of what I want it to look like and also an example of black shadow on hover.

 

Thanks,

 

Sarah

Screenshot 2023-08-31 at 22.20.12.png

Screenshot 2023-08-31 at 22.23.43.png

Link to comment
  • Solution

@visual_ess Hi Sarah, Here's a code snippet you can try:

.header-nav-list {
	row-gap: 20px;
}
.header-nav-item--active a {
	background-image: none !important;
}
.header-nav-item {
	background: #FFFFFF !important;
	padding-left: 0.4em !important;
	padding-right: 0.4em !important;
	padding-top: 0.15em !important;
}
.header-nav-item:hover {
	box-shadow: 5px 5px #000 !important;
}

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment
27 minutes ago, Lesum said:

@visual_ess Hi Sarah, Here's a code snippet you can try:

.header-nav-list {
	row-gap: 20px;
}
.header-nav-item--active a {
	background-image: none !important;
}
.header-nav-item {
	background: #FFFFFF !important;
	padding-left: 0.4em !important;
	padding-right: 0.4em !important;
	padding-top: 0.15em !important;
}
.header-nav-item:hover {
	box-shadow: 5px 5px #000 !important;
}

Amazing. Just what I wanted. 

Thank you so much!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.