how to change default font size

the font size is percentage on my theme, I have set it to the smallest which is 100% and it refers to 15px, I wanna make it 14px, what should I do

@momo110 - change % to pixel, so 100% to 14px

Hello @momo110

.your-class{

font-size:14px !important;

}

change % into px

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

it is not able to do that, my theme is taste

@momo110 can you share the page link where you want to change the font size? which section?

Hi @momo110 ,

To change the default font size in your Shopify store, you can add custom CSS to your theme. Here’s how to do it:

  1. Go to Online Store > Themes.

  2. Click on Actions next to your current theme and select Edit code.

  1. In the code editor, locate the theme.liquid file. This is typically found under the Layout folder.

  1. Scroll to the bottom of the theme.liquid file, and just above the closing tag, add the following custom CSS code:

Note: You can replace 14px with your preferred font size. This CSS rule applies the new font size to all elements within the body tag on screens larger than 750px. If you want the font size to be different for smaller screens, you can add another media query for those sizes.

  1. Click Save to apply the changes.

This method sets the default font size for your entire Shopify store.

If it does, please like it and mark it as a solution!

If you need further assistance, feel free to reach out!

Regards,
Sweans

yes here is the page: https://jonvidesign.com/products/blue-irises-floral-pattern-silk-fiber-waistband-shorts, this part I mean, including the content and the title

Hi @momo110
You can follow these step to achive your result
Go to online store->edit code->base.css file and use this css code


sorry it doesn’t work

sorry it doesn’t work

Hi @momo110 ,

I’m sorry to hear that the previous solution didn’t work for you. Let’s try a more specific approach to change the font size based on the context you’ve provided.


This code specifically targets elements within the .product__accordion class and sets the font size for titles and list items. The !important flag ensures that the font size change is applied, overriding other styles. I hope your issue will fix by this solution.

If it does, please like it and mark it as a solution!

If you need further assistance, feel free to reach out!

Regards,
Sweans

thx, where should I add these code?

Hi @momo110 ,

Here’s how to do it:

  1. Go to Online Store > Themes.

  2. Click on Actions next to your current theme and select Edit code.

  1. In the code editor, locate the theme.liquid file. This is typically found under the Layout folder.

  1. Scroll to the bottom of the theme.liquid file, and just above the closing tag, add the Provided custom CSS code. Here i am adding css code for your convenience.

If you need further assistance, feel free to reach out!

Regards,
Sweans

thx, it works, I forgot this one, is it able to change to 14px?

Hi @momo110 ,

You’re welcome!

To change the font size to 14px for the Product SKU as well, please replace the previous CSS code with the following:


Replace the previous code with this one to apply the changes to the SKU and the other specified elements. I hope your issue will fix by this solution.

If it does, please like it and mark it as a solution!

If you need further assistance, feel free to reach out!

Regards,
Sweans