Mobile not displaying the same with Custom Liquid on front page (Athens Theme)

Topic summary

A user is experiencing layout issues with custom liquid code on their Athens theme homepage. The problem involves a slider with an adjacent advertising window that displays correctly on desktop but appears misaligned and positioned far to the right on mobile devices.

Key Issue:

  • Custom liquid elements not responsive on mobile
  • User unfamiliar with properly adjusting mobile settings using @media only screen queries

Proposed Solution:
A respondent suggested modifying the base.css file by adding custom CSS media queries targeting screens with max-width of 480px. The code snippet includes:

  • Adjustments to grid span widths (70% and 30% splits)
  • Flexbox display properties
  • Min-width settings for the slideshow wrapper
  • Image width constraints with !important flags

Status: The solution includes before/after screenshots demonstrating the proposed fix, but no confirmation yet on whether it resolved the issue.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

At the top of my page there is a slider with a small advertising window next to it created using some custom liquid. I can’t seem to replicate this on mobile. It’s not centered and far off to the right side of the page. I am not familiar with how to properly adjust the mobile settings in the code using “@media only screen”. Can someone please help?

site: https://qmdirect.com/

pass: itsahg

Hi @qmdanny

Can you be more specific about what you want to edit? I’m not sure if this is what you want, but if you want your mobile screen to look like your desktop, you can do it this way:

  1. Online Store → Themes → Edit code:

  1. Find the file base.css and add this code at the end of the file:
@media only screen and (max-width: 480px){
   .group {
      display: flex;
      gap: 1rem;
      max-width: 100%;
   }
   .span_2_of_3 {
      width: 70% !important;
   }
   .span_1_of_3 {
      width: 30% !important;
   }
   .span_1_of_3 img {
      width: 90% !important;
      max-width: unset !important;
   }
   .smartSlideshow-wrapper {
      min-width: 30px;
   }
}

Here is the final result: