Jump to content

How Can I Customize the Navigation Menu on Mobile Devices?

Recommended Posts

Hi everyone,

I'm currently working on my Squarespace website, and I'm having trouble customizing the navigation menu specifically for mobile devices. I've managed to style the menu for the desktop version, but the mobile version still doesn't look quite right.

Here’s what I’m trying to achieve:

  • I want the mobile menu to have a different background color from the desktop version.
  • I’d like to increase the font size of the menu items on mobile.
  • I want to center-align the menu items instead of having them left-aligned.

I've tried using the following CSS code, but it doesn’t seem to be working on mobile:

/* Mobile Menu Customization */
@media (max-width: 767px) {
  .Header-nav .Header-nav--mobile {
    background-color: #333;
    font-size: 18px;
    text-align: center;
  }
}
Is there something I’m missing, or do I need to target a different class or ID for mobile styling? Any help would be greatly appreciated!

Link to comment
  • 3 weeks later...
  • Replies 1
  • Views 376
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

#1. #2. #3. You can use this CSS code

@media screen and (max-width:991px) {
	header#header {
		background-color: #f1f !important;
}
div.container.header-menu-nav-item * {
	font-size: 12px !important;
	text-align: center !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.