Jump to content

Dropdown color block background behind nav when hovering on nav items

Recommended Posts

My site: https://giraffe-giraffe-em23.squarespace.com/ (password: heather)

Hi! I'm looking to have a dropdown color background when hovering on any of the nav items. I want the whole header (logo, all nav items) to still be visible in front of this color block, but not any page content or footer content. I was able to get the background color to change according to each nav item, but I can't figure out the best way to have the rest of the page disappear. 

I was also hoping this color can slide down as it appears, but not a necessity. 

I'm attaching screenshots of what I have currently, versus the vision I've mocked up. On the mockup you'll notice a small piece of text below the nav item "design" which is also part of my vision when hovering on each nav item, but I haven't attempted this part yet.

 

CURRENT.thumb.png.c54df26a7ef76117d59ec80a9ec4269f.png

 

MOCKUP.thumb.png.9f95dd0a873e851e7bf6876f9b9635ba.png

Link to comment
  • Replies 1
  • Views 97
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Use this code to Custom CSS box

body:has([href="/design"]:hover) div.header-nav-item:nth-child(1)>a:after {
    content: "I develop visual brand stories";
    display: block;
    position: absolute;
    max-width: 300px;
    white-space: pre-wrap;
    text-align: left;
}

Initial

image.thumb.png.189c48764dfe17a2eafda88fd953ba83.png

Hover Design

image.thumb.png.31a16b2916a62e3582d67a4ff95cf1e3.png

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.