Jump to content

How to darken background on dropdown hover

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
On 1/6/2021 at 2:03 PM, TheSignBridge said:

Site URL: https://saladcreative.com/

I would like to try and replicate the effect on the above website. When you hover over the dropdown on the top menu it darkens the rest of the page. I would like to do this so I don't have to place an ugly box around my drop down items for them to be visible. 

Can anyone help please, thanks in advance.

@TheSignBridge I have been able to achieve this effect using this code. Hope it works for you.

.classname > div {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 999;
    width: 100%;
    left: 0;
}
.classname::after {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    left: 0;
    top: 0;
    z-index: 0;
}
Link to comment
On 1/7/2021 at 9:23 PM, TheSignBridge said:

Of course no problem, it is www.thesignbridge.com

Sorry for the delay. This is very complex. Have you found the solution yet?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

I suddenly remembered that I used to help a client with this. And you will need a script code (Business Plan).
I will try to find that code again

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.