Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Michael1570047682

How do I hide one link with CSS?

Question

Recommended Posts

  • 4

@penia – So we’re clear, you only want to hide the “About” nav li? If so, add this:


#topNav nav ul> :nth-child(2) {
 display: none;
}

Otherwise, if you are trying to hide folder within the nav li then you may need something like:


#topNav nav ul li.folder-collection ul> :nth-child(2) {
  display: none;
}

I hope this helps! If not, let me know and I’ll search some more.

Edited by rwilson
Update answer

Share this post


Link to post
  • 1

Tell me which links and folder collections you want hidden. You may need something like additional pseudo selectors with a more direct path...

Essentially if there is no apparent pattern (for ex. every 'even' or 'odd' list item) you will have to select them individually.

Edited by rwilson

Share this post


Link to post
  • 1

Hi! I'm using the Adirondack template:

https://eedcchina.squarespace.com/

and want to hide top nav items 1-5 for English version, and items 6-7 for Chinese version. I've tried the suggested code above but nothing changes.


.collection-537c8011e4b0785074d40dc6 #TopNav nav ul li.folder-collection ul>:nth-child (5) {display: none;}
.collection-537c8011e4b0785074d40dc6 #TopNav nav ul li.folder-collection ul>:nth-child (6) {display: none;}
.collection-537c8011e4b0785074d40dc6 #TopNav nav ul li.folder-collection ul>:nth-child (7) {display: none;}
.collection-537c8011e4b0785074d40dc6 #TopNav nav ul li.folder-collection ul>:nth-child (8) {display: none;}
.collection-537c8011e4b0785074d40dc6 #TopNav nav ul li.folder-collection ul>:nth-child (9) {display: none;}

Should my #topNav be replaced something else? #header-wrapper? #folder-collection? #main-navigation? I've tried all but none worked.

Note some of my top nav items are single pages and some of them are folders.

Thanks so much in advance!!!

Share this post


Link to post
  • 0

I want to hide “ABOUT” folder or any other page link from the navbar in my site too http://www.inwhirlofinspiration.com/ Can you help me? The template is Montauk.

I tried this but it hides the all the drop down folders:

#topNav nav ul li.folder-collection

I want to hide just one, this has the

id=yui_3_10_1_1_1394724813137_796

How to add this info in the code?

If I want to hide the second drop down menu, the CATEGORIES, for example, I will change the code, to:

topNav nav ul li.folder-collection ul>: second-child { display: none }

Edited by Penia
Combine questions

Share this post


Link to post
  • 0

Seriously thanks a million times, to the moon and back, seriously I have spend 2 afternoons on that thing and my knowledge on CSS are below zero.

Edited by Penia

Share this post


Link to post
  • 0

YES! Many thanks to rwilson!Works on desktop display, but unfortunately this does not work for the mobile navigation (MOMENTUM template). I cannot figure out how to address specific links to be hidden.

Any ideas?

Share this post


Link to post
  • 0

Dear rwilson,You seem the only one who can help... I am a bit like Penia... and even worse as I am french ;-). I am working with the aviator template (previously on marquee)... and I am trying to set up a bi-lingual site (French and English) on Marquee Nick Scolas tutorial was working with a bit of code injection + CSS... that does not seem to work either anymore or on aviator template...

l tried to find my way through your tutorial, but either don't get it (I tried several things that I found here) but my nav bar always displays completely in both languages...

Share this post


Link to post
  • 0

I have 10 french pages (of which one folder + blog page) and the same in english...

So i I understood right you take the ID collection of page let's say "ABOUT" and then you repeat the none display thing for all french (10) navigation titles (related to pages), is that right ? If yes then i can only say I did it and nothing happened...

Please help ! I need this website and we have no budget to make a real complete site by someone.

thanks so much

Share this post


Link to post
  • 0

Hi rwilsonThe idea is to have a french version and english version of the site. So at the moment on my top nav bar, I have all together... all the french pages L-EST - A PROPOS - Appel à bourses - ARTISTES (folder) - News - Liens - Agenda - Contactand all english pages L-EST - ABOUT - Call for grants - Artists (folder) - News - Links - Events - Contact

Share this post


Link to post
  • 0

I created on top page the two Languages linked for "français" to the french homepage and for "english" linked ti the english hompeage... but I am not sure I am right there... well anyway. the idea would be that whenever I am on french version, or better on a french page, all english pages are hidden and when I am on an english page all french pages are hidden and then the ideal would be to have the choice of language by clicking on my top language choice links

Share this post


Link to post
  • 0

Hi rwilson, please let me know if that is too much... so justI try to find another solution... thanks again !

Share this post


Link to post
  • 0

Hi rwilson i'm having a similar problem. I would like to hide multiple index pages under my galley tab in order to have more photos cycle through on the main Forte page, and I am not sure how to do so. My site is...www.alexbroadstock.com Thanks!

Share this post


Link to post
  • 0

Hi there JB3, I've been on your site and I want to ask you how did you do that ? I want two languages on my web site but I am new to this and I dont know how. Help me please I'm desperate....!!!

Share this post


Link to post
  • 0

rwilson, you are a life saver, thanks so much for your code!

I have it working now, but the menu items are still visible on the mobil site. Does anyone know how to fix this? I’ve tried the solution listed here: Hiding specific items in main navigation bar?

But it’s not working for me, and makes the code appear on my page as text.

I am admittedly rather inexperienced with coding, if anyone out there can help I’d be super grateful.

Thanks in advance!

Edited by Issla

Share this post


Link to post
  • 0

does anyone know how to hide links using the "Five" template? i have a client who wants a multilingual site and it seems hiding links is the best workaround approach, but i haven't been able to get it to work with his site, which uses "Five."

thanks much,

Ian

Share this post


Link to post
  • 0

Hi eedcchina,

I checked your website and noticed you managed to hide specific folders from the navigation bar. Could you tell me the CSS code you used for that? I've managed to specific hide pages from my navigation but folders are still visible for some reason.

Thanks!

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...