Change font size on product page for mobile

Change font size on product page for mobile

RVWebsitehelp
Tourist
18 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
11699 2293 2475

Hi @RVWebsitehelp 

Do you want to change font size for what section? 

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

RVWebsitehelp
Tourist
18 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
11699 2293 2475

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; }
}

- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

mt686
Shopify Partner
121 11 21

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
18 0 3

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

topnewyork
Astronaut
1368 165 224

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
18 0 3

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

topnewyork
Astronaut
1368 165 224

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
18 0 3

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

topnewyork
Astronaut
1368 165 224

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