Hi,
I want to reduce the size of my product title in my products pages (I want to be able to choose the size myself)
Here is the link of one of my product page : https://www.five-pocket.com/products/pro-club-heavyweight-cotton-tshirt-white
Thanks
A user seeks to customize the product title font size on their Shopify product pages, wanting control over both desktop and mobile displays.
Initial Solution (Desktop Only):
base.css targeting .product__title h1 with font-size: 3rem within a media query for screens min-width 750px.Mobile Implementation Challenge:
Revised Mobile Solution:
.product__title h1 { font-size: 3rem; } without media query restrictions.Resolution:
Hi,
I want to reduce the size of my product title in my products pages (I want to be able to choose the size myself)
Here is the link of one of my product page : https://www.five-pocket.com/products/pro-club-heavyweight-cotton-tshirt-white
Thanks
Hi @imazele
YOu can adjust the size whatever you prefer, this code is only on the desktop screen. I didnt include the mobile title size.
@media only screen and (min-width: 750px) {
.product__title h1 {
font-size: 3rem;
}
}
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Can you also do it on mobile ? I want both please !
Hi, yes you can do that.
just add the following code in your base.css file for desktop
@media only screen and (min-width: 750px) {
.product__title h1 {
font-size: 30px;
}
}
and for mobile add the following code:
.product__title h1 {
font-size: 30px;
}
Doesn’t work for mobile
Replace on this one.
.product__title h1 {
font-size: 3rem;
}
Andf Save.
Same instruction.
For mobile screens, it is advisable to use a larger font size to ensure readability on smaller devices.
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 @imazele ,
This should work on mobile.
Please confirm if you have added the above code at the end of base.css file. If you have added the code then sent me the link so that I can inspect the website and check why it is not working.
Thanks
here is my website link. still doesn’t work on mobile. https://www.five-pocket.com/products/pro-club-heavyweight-cotton-tshirt-white?variant=48361426190685
Hi, I have inspected your website and it seems that code is working correctly. Please refer to the image below. Have you added this code right now??
yeah i find it myself thanks!