Jump to content

[Share] How to make a specific nav link unclickable

Recommended Posts

To make a specific nav link unclickable on a specific page, you can follow these.

If it doesn't work, you can share site url + let me know which nav link you want to disable click, I can check easier.

#1. First, find Page ID. You can use below tool.

In my example, we will have: #collection-6673f2e18432c25013aee99f

image.png.317415263275d4e63e1129caeb5193e6.png

#2. Suppose we need to make the item: Search unclickable

image.png.47b6a6c3cd1c1df1545af30b2aa8bc9f.png

We will use this code to Custom CSS box.

#collection-6673f2e18432c25013aee99f {
  div.header-nav-item:nth-child(5), div.container.header-menu-nav-item:nth-child(5) {
  	pointer-events: none;
  }
}

image.png.7b6f58b22e06f67fca7eb71597e6dcc3.png

#3. Suppose you need to make an item in Folder Dropdown unclickable, for example item: Form Block

image.png.33545139d5dca51ca77a9032195e4a4e.png

We will use this CSS code.

#collection-6673f2e18432c25013aee99f {
  div.header-nav-item:nth-child(6) div.header-nav-item--folder:nth-child(7) {
 	 pointer-events: none;
  }
  [data-folder="/sections"]>div>div:nth-child(7) {
 	 pointer-events: none;
  }
}

image.png.db522d2513dbb65a4f77c3d680334efe.png

Note

image.png.0ffbc7fdc12dbaf8b4f8bed01a65c869.png

and /sections in [data-folder="/sections" is Folder Dropdown URL

image.thumb.png.d6d4ee2772d5c205e5e50117bce79809.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.