Shopify themes, liquid, logos, and UX
Is there a way to code it so that when using a banner section or image, you can chose the option to either show it on both desktop and mobile or on one of the two? I have seen this on this YouTube video:
https://youtu.be/dvf1zq7gVV8?si=mP3fRAxj64XZthgR (Make specific section for mobile or desktop only).
I however cannot seem to make it work on Dawn 11.0 because I cannot find the specific code lines to adjust. Can anyone help me out?
Solved! Go to the solution
This is an accepted solution.
You don't have to edit theme code for this use custom CSS settings
https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/add-css
For example use the following to hide a section on moble in it's custom css setting by using a sections ID selector (replace section-id with your sections ID attribute value😞
@media screen and (max-width: 749px){
#section-id { display: none; }
the inverse hide on desktop
@media screen and (min-width: 750px){
#section-id { display: none; }
}
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
This is an accepted solution.
You don't have to edit theme code for this use custom CSS settings
https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/add-css
For example use the following to hide a section on moble in it's custom css setting by using a sections ID selector (replace section-id with your sections ID attribute value😞
@media screen and (max-width: 749px){
#section-id { display: none; }
the inverse hide on desktop
@media screen and (min-width: 750px){
#section-id { display: none; }
}
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
This worked like a charm so thank you very much! What I did was Admin> Store> Customize> Selected the section I wanted to be on desktop only> Costum CSS> Paste the code without #section-id. Doing it this way allowed me to not have to search for the section ID and still have it working the way it was supposed to. Thankyou!
User | RANK |
---|---|
208 | |
165 | |
72 | |
56 | |
53 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023