Craft Theme - Centering text on "Page" and "Collections"

Hi!

I would like to center the text (both header and body-text) on my Pages, and on my Collection I would like to bring the header and body text in from the side so that the beginning matches where the menu row text starts, if that’s understandable. What bits of code should I use?

Store url is currently d43c26.myshopify.com and password augusti2023

Thanks in advance to anyone that can help!

1 Like

Hello there,

  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:
.title--primary {
text-align: center;
}
.page-width--narrow {
text-align: center;
}

Hi @ananna

Please follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Please find theme.liquid file
  4. Add the following code above tag

Hi!

Thank you very much for your quick solution!

What about if I would like this text on my Products page to be slightly more inwards from the edge of the site? I mean that “Böcker” (and the body text) would start approximately from the same spot as the menu item “Hem”. Perhaps the image would need to be adjusted as well, so that it would have a balanced look..

1 Like

Hello there,

  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:
.page-width {
padding: 0 14rem;
}