I want to make an individual button on my website have a different font

shopgrande
Visitor
1 0 0

I want to make a button on my website have a different font to everything else. I don't want it to interfere with other buttons, just want to do this individual one.

 

I want to have the 'explore' button in Lucia Font as in here

Also would like the 'explore' text to be underlined

shopgrande_0-1716977607226.png

My Website link is shopgrande.co 

Replies 2 (2)

JuneN
Shopify Partner
81 4 26

Hi @shopgrande, you can try Fontify app to change the font without coding.

If you find my suggestion helpful, please give it a like or mark it as a solution!
And discover more approaches to:
Streamline invoicing process Boost sales with labels & badges Add social proofs & create FOMO
Or get valuable updates and private deals regarding Shopify here.

sahilsharma9515
Shopify Partner
1031 128 193

Hi @shopgrande Please follow the steps.

 

  • Upload your font files: Upload your custom font files (e.g., .woff, .woff2) to your Shopify theme. You can do this by navigating to the "Online Store" section of your Shopify admin panel, selecting "Themes," and then clicking on "Actions" > "Edit code" for your current theme. In the theme editor, you can upload your font files to the "Assets" folder.
  • Add font-face rule in CSS: Once your font files are uploaded, you need to define a @font-face rule in your CSS to specify the font-family and the paths to your font files. You can add this rule to your theme's CSS file. Here's an example:

@font-face {
    font-family: 'CustomFont';
    src: url('{{ 'customfont.woff2' | asset_url }}') format('woff2'), /* Modern Browsers */
         url('{{ 'customfont.woff' | asset_url }}') format('woff'); /* Older Browsers */
    font-weight: normal;
    font-style: normal;
}
 

Replace 'CustomFont' with the desired name for your custom font and 'customfont.woff2' and 'customfont.woff' with the file names of your font files.

  • Apply the font to your styles: Once the font-face rule is defined, you can use the custom font by specifying font-family in your CSS styles. For example:
body {
    font-family: 'CustomFont', sans-serif;
}
 

Replace 'CustomFont' with the name you used in the @font-face rule.

  • Apply the font in your Shopify theme templates: Once you've added the font to your CSS, you can apply it to specific elements in your Shopify theme templates by adding custom CSS classes or modifying existing styles.

If you will unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.

 

Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!

 

Best Regards

Sahil

- Your

 Coffee Tip 

can create magic in coding ❤️❤️

- Need a Shopify Developer? CHAT ON WHATSAPP or EMAIL ME !


- Hopefully the solution will help you. If yes then Please hit

 Like 

and

 Mark it as solution! ❤️