I’d like to change the heading font size in the image with text block. I tried to change within the image-with-text-block.liquid but it isn’t working.
Topic summary
A user wants to modify the heading font size within Shopify’s “Image with Text” block but found that editing the image-with-text.liquid file directly didn’t work.
Two solutions were provided:
-
Theme CSS file modification: Navigate to Shopify Admin → Online Store → Themes → Actions → Edit code. Locate the theme’s CSS file (base.css, style.css, or theme.css) in the Assets folder and add custom CSS targeting the heading element (e.g.,
.ImageHero__BlockHeading h3or similar selector) with afont-sizeproperty. -
Custom CSS section: Add CSS code directly to the Custom CSS field of the specific Image with Text section, targeting the
h3element with the desiredfont-sizevalue (e.g.,font-size: 2rem).
Both approaches involve adding CSS rules rather than modifying the liquid template file.
Hi @EmBnotte
Try this one.
- From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
- Find the theme that you want to edit and click on “Actions” and then “Edit code”.
- In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
h3.ImageHero__BlockHeading.Heading.u-h6 {
font-size: 1.5rem;
}
- And Save.
- Result:
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Hi @EmBnotte
You can add this code to Custom CSS of that image with text section to change the font size of the heading.
h3 { font-size: 2rem; }
