How do i center the text in the video heading?

Topic summary

A user needs help centering text in a video heading on their Shopify product page. Two solutions are provided involving custom CSS code added to the base.css file:

Initial Solutions:

  • Target specific section ID with text-align: center property
  • Alternative approach targeting .video-section .title-wrapper-no-top-margin > .title

Issue Encountered:
The code initially works only on desktop, not mobile devices.

Resolution:
The problem occurs because the CSS was placed inside a media query block that restricts it to desktop only. Moving the code below the final closing bracket } at the very bottom of base.css makes it apply to both desktop and mobile devices.

Outcome:
Issue resolved successfully. The user then requests additional help with a separate question about placing video above product descriptions.

Summarized with AI on November 14. AI used: claude-sonnet-4-5-20250929.

https://charmente.com/products/v-back-flared-jumpsuit

Hello @Simon159 :waving_hand:

Inside Shopify Admin, you can go to Edit theme code, open file base.css and add this code at the bottom

#shopify-section-template--21742106902833__9cdfc365-2e6d-46f2-bdd3-6985f26773b7 .title-wrapper {
    text-align: center;
}

The result

Hope that helps!

Go to your Online store > Themes > Edit code > open base.css file, add this code at the bottom of your file.

.video-section .title-wrapper--no-top-margin > .title {
text-align: center;
}
1 Like

It worked buy only for desktop. This has been an issue recently, whenever I edit code for my shopify store it only works for desktop instead of mobile.

Move your code to the very bottom of your base.css file.

It is on the very bottom, right?

You added code into a code that makes it work on desktop only. Move it below the last } at the bottom to make it work for both devices.

Thank you so much! Could you see help me with something else? I made another post earlier today thats titled, “How Do I Place A Video Above The Description On My Product Page?”