A user needed to adjust the width of a contact form on product pages in the Dawn theme. Their existing CSS code (.page-width { max-width: 1500px !important; }) was affecting all sections with that class, not just the contact form.
Solutions provided:
Option 1: Add .contact.page-width { max-width: 85rem !important; } to the theme’s CSS file (base.css, style.css, or theme.css) to target only the contact section
Option 2: Use .contact.page-width:has(form#ContactForm) { max-width: 1000px !important; } in the Custom CSS section via Theme Settings
Resolution: The second solution successfully resolved the issue. The key was using more specific CSS selectors to target only the contact form section rather than all elements with the .page-width class.
Summarized with AI on November 1.
AI used: claude-sonnet-4-5-20250929.
We use Dawn theme and have custom CSS which applied to another section so I’m not sure why it’s not applying to the contact form (or perhaps it changed it?)
When you add this code, all sections with the .page-width class will be affected. If you want to target only a specific section, you should specify that section to avoid affecting others.
Try this one.
From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
Find the theme that you want to edit and click on “Actions” and then “Edit code”.
In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code: