Jump to content

[Share] Change text of “back” in Mobile Menu Navigation

Recommended Posts

To change “back” to another text in mobile menu navigation, you can use below CSS code to Website Tools > Custom CSS.

image.png.af70dad330c36b0e5bd4713625ff27e3.png

#1. All Pages

a.header-menu-controls-control.header-menu-controls-control--active>span:nth-child(2) {
	visibility: hidden;
}
a.header-menu-controls-control.header-menu-controls-control--active>span:nth-child(2):before {
  visibility: visible;
  content: "new back";
  width: 100%;
}

image.png.a04698d5099821e43823ab6c2f4e1430.png

#2. Specific Page

First, you need to find Page ID.

In my example, it is: #collection-6673f2e18432c25013aee99f

image.png.5ca22ca22ae4daedc184140a3f85c3f2.png

Next, use this CSS code

#collection-6673f2e18432c25013aee99f {
  a.header-menu-controls-control.header-menu-controls-control--active>span:nth-child(2) {
	  visibility: hidden;
  }
  a.header-menu-controls-control.header-menu-controls-control--active>span:nth-child(2):before {
    visibility: visible;
    content: "new back";
    width: 100%;
  }
}

image.png.9fc14a1e012f253628f4f8e4c46e108a.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

Hi, If I want to use an image instead of a word or symbol to replace "new back". (I want to use my own image of a triangle.) What code do I need to use instead? Many thanks for your help.

Link to comment
13 hours ago, randm said:

Hi, If I want to use an image instead of a word or symbol to replace "new back". (I want to use my own image of a triangle.) What code do I need to use instead? Many thanks for your help.

You can use this CSS code. Replace with your image url.

div.header-menu-controls span {
    color: transparent !important;
    background-image: url(https://cdn.pixabay.com/photo/2023/12/04/18/31/chrysanthemum-8430098_1280.jpg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left left;
}
div.header-menu-controls span:not(:last-child) {
    display: none;
}

image.png.29347ae618a880df061319f67da50bab.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

Hi, Tuanphan, Many thanks, that's works, I really appreciate it. Sorry for another question, but I now have a conflict with some other code that I was using to remove the underlines and the other chevrons on the overlay page. 
I was using: 

nav.header-menu-nav-list .header-menu-nav-item * {background-image: none !important; text-decoration: none !important; border: none !important;}

what do I need to use instead, many thanks if you can help

Link to comment
1 hour ago, randm said:

Hi, Tuanphan, Many thanks, that's works, I really appreciate it. Sorry for another question, but I now have a conflict with some other code that I was using to remove the underlines and the other chevrons on the overlay page. 
I was using: 

nav.header-menu-nav-list .header-menu-nav-item * {background-image: none !important; text-decoration: none !important; border: none !important;}

what do I need to use instead, many thanks if you can help

Change your code to this. If it doesn't work, please share site url, I can check easier

nav.header-menu-nav-list .header-menu-nav-item *:not(span) {
  background-image: none !important; 
  text-decoration: none !important; 
  border: none !important;
}

 

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.