Jump to content

How to hide a navigation item for certain page

Go to solution Solved by Ziggy,

Recommended Posts

<style>
.header-nav [href="/contact"] {
    display: none;
}
.burger-box {
    visibility: hidden;
}
</style>

 

with this code, I made it happen. But this time, some spaces appeared in hidden items. how can I remove that spaces? Its disturbing because there is also two more nav item and I can see that spaces between them.

Link to comment

Can you share your website URL?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

You can add a site wide password and then share your URL and the password:

https://support.squarespace.com/hc/en-us/articles/205815528-Site-wide-passwords

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • Solution

Yes, that extra space is irritating! Your current method, although better in many ways to just target the link HREF, I can't seem to work that to hide the entire space, this may work better at hiding the space, using :nth-child(2) and :nth-child(3) to hide the 2nd and 3rd like this:

<style>
.header-nav-item:nth-child(2) {
      display: none;
  }
</style>

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
13 minutes ago, Ziggy said:

Yes, that extra space is irritating! Your current method, although better in many ways to just target the link HREF, I can't seem to work that to hide the entire space, this may work better at hiding the space, using :nth-child(2) and :nth-child(3) to hide the 2nd and 3rd like this:

<style>
.header-nav-item:nth-child(2) {
      display: none;
  }
</style>

 

Ziggy, thank you very much. This one is perfect! 

Link to comment
Just now, buura said:

Ziggy, thank you very much. This one is perfect! 

No problem! Can you mark my post as the solution and give it a thumbs up? Thanks!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • 4 months later...
On 4/3/2023 at 3:03 AM, MDS said:

Can I create a different navigation on a password-protected area of my website?

Yes. Possible. But you will need to add code manually to all password protected page.

What is your site url?

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
On 4/4/2023 at 10:02 PM, tuanphan said:

Yes. Possible. But you will need to add code manually to all password protected page.

What is your site url?

mlpha.org is the site address. I'm setting up an interactive, password-protected page for a location-only experience. Once on the private page, the public navigation is not applicable so a separate navigation or no navigation would be better. 

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.