Change icon and text colour in Header on mobile ONLY

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
10133 2404 3038

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!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 3 (3)

Guleria
Shopify Partner
4112 804 1155

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

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder

suyash1
Shopify Partner
10872 1345 1719

@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 | Contact me - suyash.patankar@gmail.com , My timezone is GMT+5:30.

Made4uo-Ribe
Shopify Partner
10133 2404 3038

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!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.