How can I hide a rich text button on desktop but display on mobile?

Solved

How can I hide a rich text button on desktop but display on mobile?

StaceyS
Tourist
12 0 2

Hi. I have a rich txt section which I use to add a button on my home page. Since I have buttons on my banner I don't want it to show on Desktop -- but I do want it to show on Mobile -- Looking for a way to make this happen -- Thanks!!Screen Shot 2024-02-01 at 10.02.16 AM.pngimage0.png

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
9857 2345 2942

This is an accepted solution.

Hi @StaceyS 

Check 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 (min-width: 749px){
.rich-text.content-container.color-background-1.gradient.section-template--21766862340396__07da73f3-afd4-4dd8-9806-661137f813e5-padding {
    display: none;
}
}

 

And Save.

Result:

Made4uoRibe_0-1706803062680.pngMade4uoRibe_1-1706803075555.png

 

 

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

Reply 1 (1)

Made4uo-Ribe
Shopify Partner
9857 2345 2942

This is an accepted solution.

Hi @StaceyS 

Check 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 (min-width: 749px){
.rich-text.content-container.color-background-1.gradient.section-template--21766862340396__07da73f3-afd4-4dd8-9806-661137f813e5-padding {
    display: none;
}
}

 

And Save.

Result:

Made4uoRibe_0-1706803062680.pngMade4uoRibe_1-1706803075555.png

 

 

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.