Jump to content

Using CSS for Desktop Mobile Hamburger - Can't Change Font Size

Go to solution Solved by tuanphan,

Recommended Posts

Hi All,

I've been searching all day and can't figure this out. I've tried other people's fixes, and they aren't working.

I have used this code to make the full-screen mobile navigation:  https://www.eaalexander.com/

.header .header-burger{display:flex} 
.header-nav, .header-actions {display:none} 
.header--menu-open .header-menu { opacity: 1; visibility: visible;}
@media only screen and (max-width: 640px){ p{font-size: 1rem!important} }

It works great, but the font is enormous and there's lots of space between the nav links. Because I've used CSS, it's not allowing me to adjust the font size or space in-between the usual way. 

Can anyone help?

Pic below - you have to scroll to see the whole nav, because it's huge.


Screenshot 2023-07-31 at 6.24.13 PM.png

Edited by tenamoore
I want to follow the thread
Link to comment
  • Solution

You should remove line-height from this code, unless some menu items won't be clickable

.header-menu-nav-folder a {
    font-size: 1rem;
    line-height: .01;

to reduce space between items + font size, use this code

/* burger menu items */
.header-menu-nav-folder a {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    line-height: initial !important;
    font-size: 14px !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
  • 2 weeks later...

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.