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

Hide Folder on Mobile

Question

I have created two folders, one I wish to display on the nav bar on desktop and one I want to display while on mobile. 

Does anyone know what custom CSS is required to display the folders based on screen size?

I've found examples online for displaying blocks based on size but nothing related to the navbar folders/links. 

Share this post


Link to post

11 answers to this question

Recommended Posts

  • 1
24 minutes ago, AprilRains said:

https://www.aprilrainsphotography.com/ - Right now only one folder is enabled (Featured Collections) but I want this hidden on mobile and then I would set up the site to display another folder in it's replacement. 

Add this code to Home > Design > Custom CSS

@media screen and (max-width:640px) {
nav.Mobile-overlay-nav.Mobile-overlay-nav--primary .Mobile-overlay-nav-item:nth-child(2) {
    display: none;
}
}

Create another folder to the right of Featured. Because if you create on the left, the code will need to be changed to nth-child(3)


You can send your question to my email to get faster answer.

How to Setup Password & Share URL  Squarespace Customer Care

Share this post


Link to post
  • 0

Hi Tuanphan,

I am trying to implement a multilingual option following the following tutorial: https://www.bradgood.net/articles/multi-language-content-on-any-squarespace-template

I have suceeded making it work on computers, but in mobile devices it doesn´t hide the folders that don´t belong to the selected language. I think it is something to do with the class name of the folders inside the main menu when they are displayed in a mobile device.

https://www.ideaitor.com/

It seems other people had the same issue but the solution proposed below didnt work for me. Any clue how I can fix this?

 

Thank you in advance 😄

 

image.png.efff09bec77407b80a577e7cc096c405.png

image.png.c1a031a89666b1c0ec1fa5f0c89def64.png

Edited by Aitor

Share this post


Link to post
  • 0
11 hours ago, JohanMinnebo said:

Hi @tuanphan, thank you for your excellent solutions.

I have a similar question to the one above: how do I hide an item inside a folder on mobile?
I followed another tip of yours of adding hidden blank nav items inside my 2 column navigation to space it out evenly. And I'd like to do the same on mobile.
our website: improbubble.com

Use this

a.Mobile-overlay-folder-item[href="/level-6"] {
    visibility: hidden;
}

OR this

a.Mobile-overlay-folder-item[href="/level-6"] {
    display: none;
}

with leve-6 is page url


You can send your question to my email to get faster answer.

How to Setup Password & Share URL  Squarespace Customer Care

Share this post


Link to post
  • 0

how would you write this code for 2 or 3 items inside a folder?   Is there a more efficient way than doing this for each one?

[href="/level-6", "/level-7", "/level-8"] ???

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...