Solved

Change icon and text colour in Header on mobile ONLY

KJD
Excursionist
17 0 13

Hello,

 

Does anyone know the code to change the menu icon and cart/search icon colour on mobile only. I need it to be light on desktop, but dark in mobile (attached image shows on mobile how it doesn't show up against background).

Screen Shot 2023-09-06 at 11.13.14 AM.png

 

URL: crababblecrafts.com

password: abble

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
6035 1448 1786

This is an accepted solution.

Hi @KJD 

Try this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

@media only screen and (max-width: 749px){
header#site-header * {
    color: black;
}
}

 

  • And Save. 
  • result:
  • Made4uoRibe_0-1694020972491.png
  • You can change the color you desire.

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com


View solution in original post

Replies 3 (3)

Guleria
Shopify Partner
3084 604 862

Hello @KJD ,

 

Follow these steps:

1. Go to Online Store -> Theme -> Edit code

2. Open your base.css file and paste the following code below:

 

@media screen and (max-width: 768px) {
  #site-header svg {
    color: #000 !important;
}
}

 

Thanks

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter

suyash1
Shopify Partner
9261 1152 1495

@KJD - add this css to the very end of your base.css file and check

@media screen and (max-width: 768px) {
  #site-header .header__icon{color: #000 !important;}
}

 

suyash1_0-1694020945432.png

 

To build shopify pages use pagefly
You are welcome to contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.
Paranormal story video using AI

Made4uo-Ribe
Shopify Partner
6035 1448 1786

This is an accepted solution.

Hi @KJD 

Try this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

@media only screen and (max-width: 749px){
header#site-header * {
    color: black;
}
}

 

  • And Save. 
  • result:
  • Made4uoRibe_0-1694020972491.png
  • You can change the color you desire.

 

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
For FREE, premium codes, and trusted, knowledgeable Shopify developers, visit us at

Made4uo.com