Jump to content

Adding Dividers to Drop-Down Menu with CSS

Go to solution Solved by RyanDejaegher,

Recommended Posts

1 hour ago, RyanDejaegher said:

@todd-y you can add this to your custom CSS

 


.header-nav-folder-content > * + * {
    border-top: 1px solid rgba(0,0,0,.2);
    padding-top: 8px;
    padding-bottom: 8px;
}

 

This worked well - thank you, Ryan!

It looks like the padding configuration isn't working for the first item in the folder. The line isn't respecting the 8px distance under Administration in this image. Any ideas to remediate this?

image.png.5bb31ab9bc8e5a3dc5adad676963dc55.png

Edited by todd-y
Link to comment

Todd, this actually looks better. A little combination of both of our codes....plus  a little more.

You will have to remove the other code you just added.

.header-nav-folder-content {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.header-nav-folder-content > * {
    padding-bottom: 8px;
    padding-top: 8px;
}

.header-nav-folder-content > * + * {
    border-top: 1px solid rgba(0,0,0,.1);
}

 

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.