Solved

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

StaceyS
Tourist
11 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
5930 1427 1756

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!

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

Reply 1 (1)

Made4uo-Ribe
Shopify Partner
5930 1427 1756

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!

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