Section with the same size

Topic summary

A user needed help aligning a landing page section to match the width of sections above it. An attached screenshot showed the misalignment issue.

Initial Solutions Proposed:

  • One responder suggested adding CSS padding (padding: 0 5rem;) to .tpt-section_content in the base.css file
  • Another recommended removing existing custom CSS (max-width: 1440px;) and replacing it with a media query that includes both padding and max-width: var(--page-width)

Implementation Issues:

  • The user couldn’t locate the existing CSS code to remove
  • Initial CSS additions didn’t work as expected
  • The section remained misaligned on screens larger than 1440px

Resolution:
Adding !important to the padding rule (padding: 0 5rem!important;) resolved the issue. The user confirmed the problem was solved, though one responder noted the HTML contained a section-specific max-width rule that may have been causing the conflict.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hi, I need to make this section the same size as the section above. Can anyone help me? Thanks

Preview link: https://umhw5c-2w.myshopify.com/?_ab=0&_fd=0&_sc=1

Pass: mahpor

1 Like

Hello @pimpaoclothing

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > base.css and paste this at the bottom of the file:
.tpt-section_content {
padding: 0 5rem;
}

2 Likes

You need to remove the rule you already have in “Custom CSS” for this section:

.tpt-section_content {
  max-width: 1440px;
}

And add this instead:

@media screen and (min-width: 990px) {
  .tpt-section_content {
    padding: 0 5rem;
    max-width: var(--page-width);
  }
}

1 Like

I can’t find this code, can you help?

.tpt-section_content {
  max-width: 1440px;
}

It did’t work, i don’t know why

Hello @pimpaoclothing
Where you add the CSS? Can you send me a screenshot?

1 Like

Hi, I put it where you told me

1 Like

Hello @pimpaoclothing

.tpt-section_content { padding: 0 5rem!important; }

1 Like

ok now it worked but it still isn’t aligned with the other sections in sizes greater than 1440px

Forget it, I’ve already solved it! Thank you very much for your help

1 Like

Hi @pimpaoclothing ,

Thank you for your response. It’s good to know that it’s worked for you. Kindly feel free to get back to me if you need any further assistance. If helpful, please like all posts.

1 Like

Your HTML includes this:

/* Content max width */
#shopify-section-template--24835640394052__tpt_collection_list_2_NVVxaJ .tpt-section_content {
        max-width: 1440px;
    }

Shopify “Custom CSS” prepends section id selector to selectors of the rules entered there, so I deduced that original content for the setting was:

/* Content max width */
.tpt-section_content {
   max-width: 1440px;
}

Obviously, it’s possible that selector like the former one was entered manually, but I myself try to avoid selectors like this.

Anyways, the !important did it, so no need to dig deeper.

1 Like