A user implemented desktop customizations for their collection page that broke mobile display, making it look “strange.” They want the customizations to apply only to desktop views.
Initial Solution Attempt:
PageFly-Victor provided CSS code to add to theme.liquid above the </head> tag
The user reported this didn’t work, noting they had previously added other code that might be interfering
Alternative Solution:
EBOOST suggested a different approach: adding media query code to the bottom of Assets/theme.css instead
The code targets collection grid items with specific width adjustments for different screen sizes (max-width: 1024px and 749px)
Uses !important declarations to override existing styles
Current Status:
The issue remains unresolved. The user has not confirmed whether EBOOST’s alternative solution worked. Screenshots show the desktop version displays correctly while mobile needs optimization.
Summarized with AI on November 23.
AI used: claude-sonnet-4-5-20250929.
As you can see, my website on desktop looks as intended, however on mobile, it is not optimized correctly. On mobile, it looks strange. I only want the customization I made to be shown on desktop
Hey, this did not work. I previously copied your code for another solution. I am not sure if the code is interfering. This is how I pasted the code, along with the other solution.
@media screen and (max-width: 767px){
li.small--one-half {
width: 100% !important;
}
}
@media screen and (min-width: 1024px){
// paste your customization code here for desktop
}