Jump to content

Hide first page / link from folder in navigation

Recommended Posts

Hi, can anyone help with the following problem?

The navigation folder automatically links to the first page inside the folder. However, it is an unnecessary duplication to have my folder name and first page go to the same place. I would like my folder to go to the /about page and hide the actual About page link inside the folder. 

Is there any CSS that can be used to hide the first item in the folder? I tried the following code for desktop and mobile but they don't seem to work..

 .subnav :nth-child(1){display: none !important;}

#mobileNavWrapper .subnav :nth-child(1){display: none !important;}

Link to comment
  • Replies 7
  • Views 960
  • Created
  • Last Reply

Top Posters In This Topic

On 7/28/2023 at 2:40 PM, tuanphan said:

I see you solved with this CSS code?

.header-nav .header-nav-item--folder .header-nav-folder-title[href="/about-us"]~.header-nav-folder-content .header-nav-folder-item:first-child {
    display: none;
}

 

Thank you! For some reason now the folder does not link to my about page anymore either? I still want it linked, I just wanted to hide the link.

Link to comment
On 8/2/2023 at 9:45 AM, charlineca said:

Thank you! For some reason now the folder does not link to my about page anymore either? I still want it linked, I just wanted to hide the link.

I see it is now linked here. Or you mean dropdown disappear?

image.png.182e54a7182838c885acaba862bccef0.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.