Shopify themes, liquid, logos, and UX
The font size of my product description on product pages and metafields blocks that I have inserted are different. I need to make them all of same font size. This is my listing:
https://www.odhanon.in/products/cute-2024-summer-top-for-women
Solved! Go to the solution
This is an accepted solution.
For Mobile :
@media only screen and (max-width: 800px) {
.rte ul {
font-size: 13px;
}
.rte p {
font-size: 13px;
}
}
For Tablet :
@media only screen and (min-width: 820px) and (max-width: 820px) and (min-height: 1180px) and (max-height: 1180px) {
.rte ul {
font-size: 14px;
}
.rte p {
font-size: 14px;
}
}
For PC:
.rte ul {
font-size: 16px;
}
.rte p {
font-size: 16px;
}
yes, please paste it below the code I have sent. For the PC, that I have sent before, you just need to edit the pixels to 16px
More update on this. I have inserted this particular code at the bottom of my base.css file (came across this resolution on another shopify query post). I have two different product templates. The font size of both remains unchanged. I am not able to figure our what am I doing wrong here.
.product__info-wrapper .product__description * {
font-size: 16px !important;
}
@media screen and (max-width: 991px) {
.product__info-wrapper .product__description * {
font-size: 15px !important;
}
}
@media screen and (max-width: 480px) {
.product__info-wrapper .product__description * {
font-size: 13px !important;
}
}
You can follow this instruction:
1. Go to Shopify > Theme > Customize
2. Copy and paste this code on Theme settings > Custom CSS section
.rte ul {
list-style-type: disc;
text-align: left;
font-size: 14px;
}
.rte p {
margin-bottom: .75em;
margin-top: .75em;
font-size: 14px;
}
Result :
I hope it helps
Hey @LizHoang, thanks for this! I have two follow up questions:
1. If I use this, will the font size adjust according to different media screens?
2. Text of my metafield block i.e. Wash Care on the above listing is not aligning left. How can I adjust that?
2. For the Wash care, you can try this code :
.template-product .rte {
text-align: left;
}
Hi again @VaishaliSahu
May I know that you want to adjust different font size per media screen right?
Hi @VaishaliSahu ,
For mobile font size, you can try this code :
@media only screen and (max-width: 800px) {
.rte ul {
list-style-type: disc;
text-align: left;
font-size: 14px;
}
.rte p {
margin-bottom: .75em;
margin-top: .75em;
font-size: 14px;
}
}
This is an accepted solution.
For Mobile :
@media only screen and (max-width: 800px) {
.rte ul {
font-size: 13px;
}
.rte p {
font-size: 13px;
}
}
For Tablet :
@media only screen and (min-width: 820px) and (max-width: 820px) and (min-height: 1180px) and (max-height: 1180px) {
.rte ul {
font-size: 14px;
}
.rte p {
font-size: 14px;
}
}
For PC:
.rte ul {
font-size: 16px;
}
.rte p {
font-size: 16px;
}
yes, please paste it below the code I have sent. For the PC, that I have sent before, you just need to edit the pixels to 16px
Got it! Thank you so much 🙂
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024