Shopify themes, liquid, logos, and UX
hi - i am wondering if it's possible to make a part of the store name that appears in the header a different size font than the rest.
for example
christmas
sweater (smaller)
party
i already used the following code to break up the title onto different lines
.page-width {max-width: 600px;}
Hi @msjogren1 ,
Yes, it is possible to use different font sizes for different parts of a store name that appears in the header. One way to achieve this is by using HTML and CSS.
To make it easier, Could you please share URL and your store password if it enabled? So that we can help you.
Thank you.
https://longtimefrienddiscount.myshopify.com/
pw: sahmoh
i actually can see that the code i thought was working to break the title up onto different lines is making it so the home/catalog/contact links on the left and the cart/search icons on the right are coming into the center of the screen as opposed to staying at the edge of the screen left and right. so if you have code that creates a line break between the words in the store name and also code that allows me to make a specific word in the store name a smaller size, that is what im looking for.
thanks for your help!
Hi @msjogren1
We would like to suggest to you how to break the line of the title and adjust the font without changing the width of the header. Please follow these steps:
- First, go to Themes -> Edit code:
- Next, go to the Sections folder -> select the header.liquid file. Here, you can replace the code:
<span class="h2">{{ shop.name }}</span>
into:
<div class="header__heading-title">
<span class="h2">LONG TIME</span>
<span class="h2 h3">FRIEND</span>
<span class="h2">DISCOUNT</span>
</div>
(Here, we code based on the name of your current store, you can change it later if you want)
After you replaced the code, go to the Assets folder -> select the base.css file. Here, you add this code at the end of the file:
.header__heading-title{
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
}
.header__heading-link .h3 {
font-size: calc(var(--font-heading-scale) * 1.4rem);
line-height: 1;
color: rgba(var(--color-foreground), 0.75);
}
- (To make the font size of the text smaller, adjust the number 1.4 in the line of code "font-size: calc(var(--font-heading-scale) * 1.4rem);").
- Your store will look like this:
We hope that it will work for you.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
hi there! sorry i dropped off, but now i'm back to getting our site up. thanks so much for these instructions they were very easy to follow. i did each step but i'm not getting the same results unfortunately. are you able to take a look and see why?
Hello @goldschdr
To provide you with the most precise solution in this case, could you please share your page URL ( with pass if your store password is enabled )?
Thank you and hope to hear from you.
Best regards,
GemPages Support Team
Hi @msjogren1
Can you kindly share your store link (with the password, if any) with us? We will check it and suggest you a solution if possible.
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
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