How to change Cart icon and Menu icon to "cart" and Shop" ONLY on mobile

How to change Cart icon and Menu icon to "cart" and Shop" ONLY on mobile

Maiselnielsen
Excursionist
27 1 2

Hi, 

 

Can you help me? 

 

I need to change the card icon and the menu icon to the text "Cart" and "Shop" ONLY on mobile. I want to keep the icons in the desktop version and instead have text on the mobile version. 

 

I have the dawn theme. 

 

Thank you in advance. 🙂 

 

www.linierelingerie.com

xef84eju

Replies 5 (5)

Roy-ロイ
Shopify Partner
81 17 30

Hi @Maiselnielsen , 
Just to confirm, is this how you would want it to be? 

Roy_0-1723295188737.png

 

We can do this through CSS.

To get started, follow these steps:

  1. Log in to your Shopify Admin panel.
  2. Go to Online Store > Themes > Customize.
  3. In the Customizer, navigate to the Theme settings and add the below code in the Custom CSS field. 

 

 

@media screen and (max-width: 749px) { 
    a#cart-icon-bubble::after {
        content: 'Cart';
    }
    a#cart-icon-bubble svg {
        display: none;
    }

    summary.header__icon.header__icon--menu span::after {
        content: 'Menu';
    }

    summary.header__icon.header__icon--menu svg {
        display: none;
    }
}​

 

 

Let's connect and grow your Shopify business together! 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Connect with me at: roy.solution.partner@gmail.com ( CRO | Site Speed Optimization | Custom Development )

Maiselnielsen
Excursionist
27 1 2

Hi, 

 

That sounds good! 🙂

 

I was thinking about something like this where the monogram stands out in the middle. See attached. 

 

In terms of the search field can it be placed next to the "card" description in the same size as the text? 

 

Thank you so much in advance! 

 

IMG_3656.PNG

Roy-ロイ
Shopify Partner
81 17 30

I love where this is going. 🙌

Regarding your request, absolutely, I can make it happen! However, I would suggest that instead of using CSS to move things around, we should use HTML to structure the layout. This will make it more semantic and easier to maintain in the long run.

What do you think? Does that sound like a good approach to you? Let me know.

Let's connect and grow your Shopify business together! 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Connect with me at: roy.solution.partner@gmail.com ( CRO | Site Speed Optimization | Custom Development )

Maiselnielsen
Excursionist
27 1 2

Hi, 

 

I am open to try ! Let me know what to do. 🙂 

BSSCommerce-B2B
Shopify Partner
1197 311 368

Hi @Maiselnielsen, to change the cart icon and menu icon to text on mobile while ensuring everything still works well, follow these steps:

Step 1. Go to Admin -> Online store -> Theme > Edit code

Step 2. Find the file base.css.
Step 3. Add this code at the end of file

 

 

@media only screen and (max-width: 990px) {
	header-drawer details svg {
		visibility: hidden !important;
	}
	header-drawer::after {
		content: "Shop";
		position: absolute;
		top: 35px;
		left: 37px;
		z-index: 0;
		pointer-events: none;
	}
	a#cart-icon-bubble::after {
		content: "Cart";
	}
	a#cart-icon-bubble svg {
		display: none;
	}
}

 

 

Result:

BSSCommerceB2B_0-1723296137624.png

 

If it helps you, please like and mark it as the solution.

Best Regards

 

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


BSS: B2B Wholesale Solution |BSS: B2B Portal, Quote, Net 30 | B: B2B Lock Password Protect


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency