Center Headline, Text and Button

Hi, does anyone know how to make the Headline, Text and button center on PC with custom css? Thank you!
Best regards,

Eliott

Store URL: https://servicedetable.com/

Hi @INKLY ,

To center the headline, text, and button on your Shopify store for desktop, you can use custom CSS.

Follow these steps:

  1. Online store > Themes > Edit code

  2. In the Assets folder, look for your CSS file (usually named theme.scss.liquid or similar).

  3. Add the following CSS code at the bottom of the file:

/* Center the headline, text, and button */
.your-class {
    text-align: center;
}

.your-class h1, 
.your-class h2, 
.your-class p {
    margin: 0 auto;
}

.your-class .button {
    display: inline-block;
    margin: 0 auto;
}

Replace “.your-class” with the specific class or ID that wraps your headline, text, and button elements. If you’re unsure of the class or ID.

This CSS will center-align the text and button elements on the page. If you need more specific adjustments, let me know!

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

Best Regard,

Rajat Sharma

Hi, Thank you for your answer, I managed to find the file (I think), but I can’t find the proper class for the button. Can you help me identify it please?