Shopify themes, liquid, logos, and UX
Help! I'm baffled.
I am trying to hide a section on desktop only and it's not working.
I'm looking to hide #shopify-section-16268988909f0f72b3
i've used
@media screen and (min-width: 750px) {
#shopify-section-16268988909f0f72b3 {display:none;}}
but it's still showing up on desktop.
i've also used
div#shopify-section-16268988909f0f72b3 {display:none;}}
and then @media screen and (max-width: 749px) {display:block}} but then it doesn't show up on mobile!
Any insight would be greatly appreciated.
https://thehazelcollection.com/
password: glauts
Solved! Go to the solution
This is an accepted solution.
@LBmedia it's because one of your media-queries brackets isn't closed properly. You don't need so many media queries. If you're trying to modify CSS it is better to write it in the media-query tag which is already available, rather than create another one.
sorry for that issue can you please try this code
1. Go to Online Store->Theme->Edit code
2. Asset->/stylesheet.css->paste below code at the bottom of the file.
@media (min-width: 740px ) {
div#shopify-section-16268988909f0f72b3 {
display: none;
}
}
Thanks for the info - I just tried and unfortunately it didn't work - it is still showing up on desktop.
Hi,
I see that you put the code inside two block
@media screen and (max-width:740px) {
You should put the code outside any block
Thanks for this, it still didn't work! I can't get it hidden on desktop!
Any help is greatly appreciated.
hello @LBmedia
please Go to Online Store->Theme->Edit code then go to assets/theme.css ->paste below code at the bottom of the file.
@media only screen and (min-width: 749px) {
#shopify-section-16268988909f0f72b3{
display: none !important;
}
}
Hey thanks for the advice, but it didn't work- it's still showing up on Desktop!!
I've tried every variation possible that I can think of. Nothing is working.
This is an accepted solution.
@LBmedia it's because one of your media-queries brackets isn't closed properly. You don't need so many media queries. If you're trying to modify CSS it is better to write it in the media-query tag which is already available, rather than create another one.
THANK YOU!!
Hey @LBmedia , can you please tell me how you find the section id? I have been looking for hours already with no luck. Would be super grateful!
Just right click on the section and inspect it! You'll find the id there! If you need help, send me a link and let me know which section you need and I can get the ID for you! @Jacquline
Thank you so much!
@LBmedia if there a way to hide a "custom liquid" section in Dawn on desktop only on a product page? I want to show a video on a mobile product page only, but not on desktop.
Thanks for your help!!
sorry but i can't see above code where do you have add this?
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024