I have spent hours trying the change the font size for my products but cannot manage it. Iv’e tried adding custom CSS snippets, code into the main theme.liquid but still no success. How can I do this? I am using the vision theme
Many thanks
Hey there! Changing the font size on your product page for mobile should be straightforward with the right CSS targeting. Here’s how to tackle it:
How to Fix It with Custom CSS1. Log in to Your Shopify Admin:
Go to Online Store > Themes > Edit Code.
Find the Right CSS File:
Look for theme.css or style.css in the Assets folder.
Add Mobile-Specific CSS: Add the following code at the bottom of the file:
@media (max-width: 768px) {
.product-page-class {
font-size: 16px !important; /* Replace with your desired size */
}
}
Replace .product-page-class with the actual class name for the text you want to change. You can find it by inspecting the product page with your browser’s developer tools. Use ‘!important’ to make sure it overrides any other styles.
Save and Test:
Save the file and refresh your product page on mobile to check the changes.
If You’re Not Sure About the Class Name:- Open your product page in your browser.
Right-click on the text and select Inspect.
Look for the class attribute (e.g., class=“product-title”). Use that class name in your CSS rule.
Easier Option with EasyEdits:
If you’re tired of chasing code, you could try EasyEdits. It lets you visually change font sizes directly on your product page without needing to dive into code. Plus, you can make edits during the free trial and keep them forever—even if you decide not to continue with the app.
Let me know if you get stuck or need help finding the class name! (By the way, I’m the developer of EasyEdits, so feel free to ask any questions about it. )