Shopify themes, liquid, logos, and UX
Hi, I would like to change the font in the announcement bar from the current bold one to the one used in the header and product description page (using "Sans-serif" system font), and to then separately adjust the font size for desktop view only. I appreciate any help.
website: https://leediastore.com/
Thanks!
Add this codes inside your base.css or theme.css.
Change the font family in the announcement bar:
p.announcement-bar__message.h5 {
font-family: sans-serif !important;
}
Adjust the font size for desktop view only:
@media only screen and (min-width: 768px) {
p.announcement-bar__message.h5 {
font-size: 25px;
}
}
I hope that helped!
The font size code worked but for some reason the font family didn't change.
Here's the issue (base.css - line 283):
font-family: 'outersans' !important;
If you remove the !important, my code will work!
Hello @LEEDIA 👋
Inside Shopify Admin, you can go to Edit theme code, open file base.css and add this code at the bottom
.announcement-bar__message {
font-family: var(--font-body-family) !important;
}
@media (min-width: 750px) {
font-size: 20px;
}
The result on desktop
Hope that helps!
I appreciate the help but it's still not changing the font itself, seems like it's being overridden by another line of code that sets the heading fonts to the bold one. Not sure how to fix this.
Hi @LEEDIA 👋
Try using this code instead
#shopify-section-sections--21211832713521__announcement-bar .announcement-bar__message {
font-family: var(--font-body-family) !important;
}
@media (min-width: 750px) {
#shopify-section-sections--21211832713521__announcement-bar .announcement-bar__message {
font-size: 20px !important;
}
}
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025