Jump to content

Force Nav item Underline to Display

Go to solution Solved by tuanphan,

Recommended Posts

Posted

I'm currently using this code to display underlines on a parent-level active page:

.header-nav-item--active a {
  border-bottom: 2px solid #D79D4D !important; 
  background-image: none !important;
}

For subpages that technically belong under a parent nav item, is there a way to force that underline to continue to display on it's subpages?

URL: upliftingme.co

Posted

@tuanphan

Yes, that's what I meant by "subpages". When a visitor clicks on any item on the Movements page, and is taken to that "subpage", I would like for the Movements nav item to still be in an active state.

Similarly, I'd like the same to happen for "Artists", "Articles" and "Quizzes" nav items.

  • Solution
Posted

It will be quite manual.

For example this page: https://liftin.me/abstract-art and https://liftin.me/academic-art (belongs Movement page)

Add this code to Page Header Code Injection of 2 pages

<style>
  header#header [href="/movements"] {
    border-bottom: 2px solid #d79d4d !important;
    background-image: none !important;
}
</style>

Do similar for other items

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!)

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.