How can I modify the width of collapsible content on a specific page?

Topic summary

Goal: Adjust the width of collapsible content on the Stockists page to match the homepage, without affecting the homepage.

Initial attempt: A code addition in theme.liquid changed widths on both pages and made them too small.

Scoping fix proposed: Wrap Stockists-specific changes in a Liquid condition: if page.handle == ‘stockists’ (page.handle identifies the current page). However, the example showed the condition without the actual CSS inside.

Working CSS provided: Adding .grid–1-col .grid__item { max-width: 95% !important; } to base.css improved the Stockists layout.

Further adjustment: The requester asked to make it slightly wider to match the homepage. Advice given: increase the max-width value (e.g., above 95%) until it visually matches.

Key consideration: Ensure the CSS applies only to the Stockists page to avoid affecting the homepage—either by wrapping the CSS within the Liquid condition in theme.liquid or by using a Stockists-specific selector.

Status: Partially resolved; final tuning of max-width and scoping to the Stockists page remain as action items. Screenshots and a shop link were provided for context.

Summarized with AI on January 26. AI used: gpt-5.

Hello, I have 2 collapsible content on my website. One in the main page which is perfect on desktop and mobile and one on the “stockist” page.

I would like to modify the stockist one. I would like it to be a bit less wide ( the same as in the front page basically) as i showed in the screenshot ( and of course on the right size too).

This modification must not modify the size of the one in the main page as it is already perfect :slightly_smiling_face:

Shop link : https://0e0f82.myshopify.com/

Thanks by advance if it is possible !

Hey @GadVenin

Follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above tag.

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

Hello Moeed, it changed on both pages and it is completely too small unfortunately…

Hey @GadVenin
Remove the previous code and add this updated code. This code will only effect on Stockists page.

Follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above tag.
{% if page.handle == 'stockists' %}

{% endif %}

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like

@GadVenin add below css into base.css file

.grid--1-col .grid__item {
    max-width: 95% !important;
}

Yes ! It is much better is it possible to make it a bit wider so it is the same as on the main page ?

You can change the max-width from the coding according to how you want and set it accordingly!

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

1 Like