A user encountered unwanted white space between their header and a newly added section on their store locator page, causing the background color to show through.
Solutions Provided:
CSS modification to theme.css file: Add padding-top: 0px !important; to .main-content class (for screens min-width 750px)
Custom CSS targeting the specific section: Set both margin-top: 0; and padding-top: 0; on the section’s class or ID
Alternative approach: Insert CSS code in theme.liquid file before the </body> tag
Resolution:
The issue was successfully resolved using one of the CSS solutions. The user adjusted the padding to 10px instead of 0px to prevent cutting off part of an image, achieving the desired appearance.
Summarized with AI on November 20.
AI used: claude-sonnet-4-5-20250929.
I have added a section to my store locator page, but it appears that the section is not displaying tightly below my header, resulting in the background color showing. How can I remove this space? I tried changing the background color but that does it for the whole page/site.
In the theme editor, look for the section or block that contains your store locator page.
Identify the CSS class or ID associated with that section or block.
Once you’ve identified the class or ID, you can add custom CSS code to adjust the spacing. Here’s an example:
/* Replace ".your-section-class" with the actual class or ID of your section */
.your-section-class {
margin-top: 0; /* Set the top margin to 0 to remove the space */
padding-top: 0; /* Set the top padding to 0 to remove the space */
}