Jump to content

Issue hiding first-child item in navbar folder

Recommended Posts

Site URL: http://https/www.sheworldhealth.org/

I am trying to hide the "campaigns lp link" item from the "Campaigns" folder of my navigation bar as shown below:

1077817219_2020_08.19-18.30(2).thumb.png.3e056d4d95d2d9a233675b011777786d.png

This is the code I am using right now in my Design>Custom CSS area. It is not working:

span.Header-nav-item.Header-nav-item--folder:fourth-child(2) a.Header-nav-folder-item:first-child {
display: none;
}

The "campaigns" folder is the fourth child in the main navigation bar but its the third folder. I tried using third-child, 4th-child, 3rd-child and none of these seem to work. The "campaigns lp link" child of that folder is a page link. Do I have the CSS syntax wrong?

 

Edited by SHE_WebDev
Link to comment
  • Replies 4
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 1 year later...
On 8/20/2020 at 1:56 PM, tuanphan said:

Add to Home > Design > Custom CSS

a.Header-nav-folder-item[href="/campaigns-lp"] {
    display: none;
}

 

I'm trying to do the same thing, but my  link is an anchor tag... I thought it might be the following but it doesn't seem to work.

a.Header-nav-folder-item[href="#distributors"] {display: none;}

Any thoughts tuanphan? Thanks!!!

Link to comment
On 4/12/2022 at 4:38 PM, DWgraphicdesign said:

I'm trying to do the same thing, but my  link is an anchor tag... I thought it might be the following but it doesn't seem to work.

a.Header-nav-folder-item[href="#distributors"] {display: none;}

Any thoughts tuanphan? Thanks!!!

Hi,

What is your site url? I can check easier

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.