Support » Theme: Storefront » How can I set all H1 titles to be aligned center?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, @boppar!

    Can you see if the following CSS works for you?

    h1.entry-title {
    	text-align: center;
    }
    

    You can add that to your site under Appearance > Customize > Additional CSS.

    Thread Starter boppar

    (@boppar)

    @dcka
    Thanks, Cara, that works fine.

    I want to H1 titles to be aligned on categorypages as well.

    I tried this CSS below, but it didn’t work:
    woocommerce-products-header__title page-title {
    text-align: center;
    }

    Do you know what CSS that will align H1 titles on category pages?

    Thread Starter boppar

    (@boppar)

    @dcka
    Hi Cara.
    Never mind category titles align center. No need for that.
    You code worked great for H1 titles on homepage and information pages.
    Unfortunately your code also align center the H1 titles on the product pages. i want to avoid that.

    Is there a CSS code that doesn’t affect the product pages?

    • This reply was modified 2 months, 1 week ago by boppar.

    Hi, @boppar!

    If the only pages you don’t want to be affected by the H1 styling are the product pages, you can use this code:

    h1.product_title.entry-title {
    	text-align: left;
    }
    
    Thread Starter boppar

    (@boppar)

    Hi @dcka
    That works fine. Thank you for great support.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.