Hello, my header menu on phone looks different than my header menu on desktop. How can I change the font of the header menu on phone? URL: TrendBlend.
Phone:
Desktop:
A Shopify store owner noticed their header menu font appears different on mobile versus desktop and wants to make them consistent.
Two CSS Solutions Provided:
Bundler-Manuelâs approach: Target the .site-nav .site-nav__label class and add font-size: 15px !important; to the theme.css file at the bottom.
rajwebâs approach: Use .menu-drawer__menu-item with media queries to control both desktop and mobile font styling separately, allowing customization of font-family and font-size for each viewport.
Implementation Steps:
Both solutions involve adding custom CSS to override the default mobile header menu styling. The second solution offers more granular control with responsive breakpoints.
Hello, my header menu on phone looks different than my header menu on desktop. How can I change the font of the header menu on phone? URL: TrendBlend.
Phone:
Desktop:
Hey there @TrendBlend follow the steps below and you should be able to have it set to the font size youâll like
.site-nav .site-nav__label {
font-size: 15px !important;
}
Hey @TrendBlend ,
To change the font of this menu on mobile, you can use the following CSS:
/* General font styling for header menu */
.menu-drawer__menu-item {
font-family: 'Your Desired Font', sans-serif;
font-size: 18px; /* Adjust for desktop */
}
/* Specific font styling for mobile */
@media (max-width: 768px) {
.menu-drawer__menu-item {
font-family: 'Your Desired Font', sans-serif;
font-size: 16px; /* Adjust for mobile */
}
}
Replace âYour Desired Fontâ with the font you want to apply, such as âArialâ, 'Roboto, etc. Adjust the font-size values as needed.
Follow these steps:
Online Store > Theme > Edit Code
Open your main CSS file (e.g., theme.css or theme.scss.liquid )and paste this code at the bottom.
3.This will apply your font preferences to the menu items in both views, with specific adjustments for mobile. Let me know if you need further help!
If I was able to help you, please donât forget to Like and mark it as the Solution!
If youâre looking for expert help with customization or coding, Iâd be delighted to support you. Please donât hesitate to reach out via the email in my signature belowâIâm here to help bring your vision to life!
Best Regard,
Rajat Sharma