How to change Font Size for Rich Text on Home Page and change button color

Hi,

I have a question on how to change font size for rich text on the homepage of my store. I also wanted to change the Shop Now button color to gray. The link to my store is: www.liftchairheaven.com See below for screenshots.

1 Like

@Allen6224

To change font size for rich text and background color of button you can add css code here to your theme:

Admin β†’ Online Store β†’ Themes β†’ Customize Code β†’ assets/custom.css

.rich-text .rich-text__text {
   font-size: 16px; /* Note: You can change font size as you want by change number 16 to any number you want */
}

.rich-text__blocks .button {
  background-color: gray;
  box-shadow: 0 0 0 .1rem rgb(154 153 153);
}

Hi @Allen6224

Go to Shopify Admin β†’ Online Store ->Theme β†’ Edit code->theme.liquid β†’ Add below code before

Add this code in the end of the base.css file.

{%- if template contains 'index' -%}

{%- endif -%}

Hello @Allen6224

  1. Go to Online Store β†’ Theme β†’ Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

{% if template contains β€˜index’ %}

.rich-text__blocks .rich-text__text.rte { font-size: 19px !important; } .rich-text__blocks h2.h1 { font-size: 52px !important; } .button:not([disabled]):hover{ box-shadow: unset !important; } .rich-text__blocks a.button.button--primary { background: grey !important; border: 1px solid gray !important; }

{% endif %}

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Hello @Allen6224
Go to online store ----> themes ----> actions ----> edit code ---->assets ----> section-rich-text.css
add this code at the end of the file.

.rich-text__text.rte {
font-size: 18px !important;
}
.button.button--primary {
background-color: gray !important;
}

result

If this was helpful, hit the like button and accept the solution.
Thanks

Hi @Allen6224 , kindly use the below code:

  1. Go to Online Store β†’ Theme β†’ Edit code.
  2. Open your theme.liquid file
  3. In theme.liquid, paste the below code before
{%- if template contains 'index' -%}

{%- endif -%}

If my reply is helpful, kindly click like and mark it as an accepted solution.

Thanks!

  • Here is the solution for you @Allen6224
  • Please follow these steps:

  • Then find the theme.liquid file.
  • Then add the following code at the before tag and press β€˜Save’ to save it.
{% if template contains 'index' %}
 
{% endif %}
  • Here is the result you will achieve:

  • Please press β€˜Like’ and mark it as β€˜Solution’ if you find it helpful. Thank you.