Change font size on product page for mobile

Change font size on product page for mobile

RVWebsitehelp
Tourist
16 0 3

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

Here is the link to my store: https://www.lazyluresfishing.com/

Replies 10 (10)

Dan-From-Ryviu
Shopify Partner
10766 2128 2249

Hi @RVWebsitehelp 

Do you want to change font size for what section? 

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

RVWebsitehelp
Tourist
16 0 3

The title for each product. It's set to 100% but cannot go any lower. I need the product titles to be made smaller for mobile

Dan-From-Ryviu
Shopify Partner
10766 2128 2249

Please add this code to Custom CSS in Online Store > Themes > Customize > Theme settings.

@media (max-width: 749px) {
.thb-product-detail .product-title { font-size: 1.8rem !important; }
}

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

mt686
Shopify Partner
90 11 20

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 CSS

  1. Log in to Your Shopify Admin:

    • Go to Online Store > Themes > Edit Code.
  2. Find the Right CSS File:

    • Look for theme.css or style.css in the Assets folder.
  3. 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. 😊)

RVWebsitehelp
Tourist
16 0 3

Thanks you but I can't seem to find either theme.css or style.css folders

topnewyork
Astronaut
989 136 170

Hello, @RVWebsitehelp 

1) Go to Online Store
2) Edit Code
3) Find theme.css/base.css file
4) Add the following code in the bottom

h1.product-title {
    font-size: 22px !important; /* increase as per your choice */
}

Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
RVWebsitehelp
Tourist
16 0 3

Hi, I don't have theme.css or base.css. I only have theme.liquid

topnewyork
Astronaut
989 136 170

No worries at all, on theme.liquid you can add after head like this 

<style>
@media screen and (min-width: 990px) {
    .collection--full-width slider-component:not(.slider-component-desktop) {
        /* padding: 0 1.5rem; */
        /* max-width: none; */
        max-width: var(--page-width);
        margin: 0 auto;
        padding: 0 5rem;
    }
}
</style>
Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
RVWebsitehelp
Tourist
16 0 3

Thanks. I will try this now. And where abouts in the code do I change the size of the font?

topnewyork
Astronaut
989 136 170

You can add after padding like this 

<style>
@media screen and (min-width: 990px) {
    .collection--full-width slider-component:not(.slider-component-desktop) {
        max-width: var(--page-width;
        margin: 0 auto;
        padding: 0 5rem;
        font-size: 20px !important; /* increase or decrease as per your choice */
    }
}
</style>
Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month