Change ALL <p> <h1> <h2> <h3> font size in base.css

xnyjyh
Excursionist
135 0 6

I was given this code (.body {
font-size: 13px !important;
}

and it only changes some sections for the body font size. I need to be able to change ALL p h1 h2 h3 font size in one shot for all sections for time sake. its very tedious change each section manually. How can this be done? Thanks

Replies 7 (7)

PageFly-Richard
Shopify Partner
4050 903 1556

Hi @xnyjyh 

 

This is Richard from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

 

 

<style>
p{
 font-size: 13px !important; #Change the number 13 to the number you want to be the font size number
}
h1{
 font-size: 13px !important; #Change the number 13 to the number you want to be the font size number
}
h2{
 font-size: 13px !important; #Change the number 13 to the number you want to be the font size number
}
h3{
 font-size: 13px !important; # Change the number 13 to the number you want to be the font size number
}
</style>

 

Hope this can help you solve the issue

Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

xnyjyh
Excursionist
135 0 6

Thank you. For mobile view do I just add @media screen and (max-width: 749px) { under <style>to define mobile view sizing?

websensepro
Shopify Partner
873 117 126

Hi, @xnyjyh.

Follow These steps,

Go to the online store theme and go to base.css file paste the code mentiond below.

 

@media (min-width: 320px) and (max-width: 767px) {
p, h1, h2, h3{
 font-size: 9px !important;
}

}

If I managed to help you then, don't forget to Like it and Mark it as Solution!

Need a Shopify developer?
Hire us at WebSensePro
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here
xnyjyh
Excursionist
135 0 6

Code does not work, nor do the other replies with codes. only change some. need code to change all at one shot. another solution?

xnyjyh
Excursionist
135 0 6

does not change any links, buttons

theycallmemakka
Shopify Partner
1157 249 268

Hi @xnyjyh 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find base.css file
4) Add the following code at the end of the file

 

p, h1, h2, h3{
 font-size: 13px !important;
}

If you require further help to optimize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

 

Best Regards,
Makka

❤️❤️

Buy me a coffee


For quick response - Message Me


For easy store customization, try PageFly
Add Winter vibe to your store
xnyjyh
Excursionist
135 0 6

none of your guys codes work, only change some font sizes. not ALL. even in some sections it only some. like newsletter section, it change only the <p> not the h1