Re: How to properly wrap specific code in media query?

Solved

How to properly wrap specific code in media query?

JhordanMSUITE
Shopify Partner
135 2 42

Hello, I need assistance. I am trying to wrap a specific code in a media query to make "mobile only" customizations. When I try, desktop is affected and other technical issues begin to arise. I am trying to simply move the "filters" title back into the viewport on mobile. This works when make margin-left: 0px; but it totally messes up everything I created on the desktop view. What is the proper way to wrap this code, so desktop settings won't be affected?

 

Screenshot 2023-10-09 at 11.13.31 AM.png

 

 

 

@media only screen and (max-width:777px)
{:where(.listing-page,.search-page) .intro .filter>summary {
    padding: var(--padding);
    margin-left: 0vw;
}

 

 

 

https://2d26b3.myshopify.com/collections/all

pw: reishi

 

 

 

 

Accepted Solutions (2)

PageFly-Henry
Shopify Partner
1184 335 286

This is an accepted solution.

Hi @JhordanMSUITE 

This is Henry from PageFly - Landing Page Builder App

 

You can try this code by following these steps: 

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file app.css

Step 3: Paste the below code at bottom of the file -> Save

 

@media (max-width: 767px){

:where(.listing-page,.search-page) .intro .filter>summary {

    margin-left: 0 !important;

}}

 

Hope that my solution works for you.

Best regards,

Henry | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Made4uo-Ribe
Shopify Partner
7704 1860 2276

This is an accepted solution.

Hi @JhordanMSUITE 

 

You are missing a closing curly bracket. 

@media only screen and (max-width:777px) {
   :where(.listing-page,.search-page) .intro .filter>summary {
       padding: var(--padding);
       margin-left: 0vw;
   }
}

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.

View solution in original post

Replies 2 (2)

PageFly-Henry
Shopify Partner
1184 335 286

This is an accepted solution.

Hi @JhordanMSUITE 

This is Henry from PageFly - Landing Page Builder App

 

You can try this code by following these steps: 

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file app.css

Step 3: Paste the below code at bottom of the file -> Save

 

@media (max-width: 767px){

:where(.listing-page,.search-page) .intro .filter>summary {

    margin-left: 0 !important;

}}

 

Hope that my solution works for you.

Best regards,

Henry | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

Made4uo-Ribe
Shopify Partner
7704 1860 2276

This is an accepted solution.

Hi @JhordanMSUITE 

 

You are missing a closing curly bracket. 

@media only screen and (max-width:777px) {
   :where(.listing-page,.search-page) .intro .filter>summary {
       padding: var(--padding);
       margin-left: 0vw;
   }
}

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.