Jump to content

How to add a line divider in between each link on the mobile menu?

Go to solution Solved by Ziggy,

Recommended Posts

  • Solution

Try adding this to Custom CSS:

div.header-menu-nav-item a {
    border-bottom: 1px solid #bfa260;
    padding-bottom: 5vw;
}

 

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

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Add this as well to Custom CSS:

@media only screen and (max-width:767px) {
  :is([aria-current="page"], [aria-current="true"]) .header-menu-nav-item-content {
    background-image: none !important;
  }
}

If that works, can you mark my post as the solution and give it a like? Thanks!

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

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
22 minutes ago, Miicherey said:

Thank you so much for the help and fast revert! 

Happy to help!

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

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • 4 months later...

Hi Ziggy, about this topic.

Do you have any code to center the text within the lines? I would also like the lines to be max width. Is this possible?  This is the code I'm using currently.

div.header-menu-nav-item a {
    border-bottom: 1px solid #000;
    padding-bottom: 8vw;
    padding-left: 2.5vw;
    padding-right: 100vw;
}

I hope you can help me, thanks!

My url is madebylijn.nl.

Edited by Madebylijn
Link to comment
On 4/24/2024 at 1:02 AM, Madebylijn said:

Hi Ziggy, about this topic.

Do you have any code to center the text within the lines? I would also like the lines to be max width. Is this possible?  This is the code I'm using currently.

div.header-menu-nav-item a {
    border-bottom: 1px solid #000;
    padding-bottom: 8vw;
    padding-left: 2.5vw;
    padding-right: 100vw;
}

I hope you can help me, thanks!

My url is madebylijn.nl.

Try this CSS code to center it.

.container.header-menu-nav-item.header-menu-nav-item--collection {
    text-align: center !important;
}

.header-menu-nav-item-content {
    display: block !important;
}

div.header-menu-nav-item a {
    padding: 5px !important;
}
body {
    overflow-x: hidden;
}

 

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
  • 3 months later...

Hi, Thanks this code is great. I have successfully used the code to hide the underline of the current page on mobile view, but I am using the mobile menu view also to show on desktop. When I select the menu on desktop view the lines reappear. How can I adjust the code? See the screen shots and the underline on bar. Thanks in advance! Trevor

Screenshot 2024-08-21 at 8.46.43 AM.png

Screenshot 2024-08-21 at 8.46.54 AM.png

Link to comment
On 8/21/2024 at 7:48 PM, TrevH said:

Hi, Thanks this code is great. I have successfully used the code to hide the underline of the current page on mobile view, but I am using the mobile menu view also to show on desktop. When I select the menu on desktop view the lines reappear. How can I adjust the code? See the screen shots and the underline on bar. Thanks in advance! Trevor

Screenshot 2024-08-21 at 8.46.43 AM.png

Screenshot 2024-08-21 at 8.46.54 AM.png

So you want to remove line on Desktop? Can you share 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

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.