Jump to content

Fix spacing on burger dropdown menu

Recommended Posts

Site URL: https://otennatechnologies.com/

Hi.  I have the following CSS code to create a desktop burger and dropdown menu.  How do I get rid of the white space above the linear black to red gradient when you click on the hamburger?  Thanks.

CURRENT CODE

.header .header-burger{display:flex} .header-nav, .header-actions {display:none}
.header--menu-open .header-menu {font-family: roboto;
opacity: 1;
visibility: visible;
width: 30%;
margin-left: 70%;
box-shadow: -5px 5px 15px #000000
}
div.header-menu-nav-item a { color:white!important;
    font-size: 20px !important;
    padding: 10px;
}
 .header-menu-nav-folder-content{background:linear-gradient(to bottom, #000000,#7a1009);} 
.header-menu-nav-item {line-height: 20px!important;}
/* If you only want to have the desktop burger visible this CSS will remove all the */
@media (min-width: 767px) {
  .header-nav-list a:not([href='/burger']) {
    display: none;
  }
}
@media screen and (min-width:992px) {
.header-menu-actions {
    justify-content: center !important;
}
.header-menu-cta {
    position: relative;
    top: -100px;
}
}

Link to comment
  • 1 year later...

I found this post very helpful thank you. I know how to amend code to change details like colour, font size etc, but having access to it in the first place to then change is a life saver. Thank you. 

I've used an amended script for www.strathearnengineering.com

Link to comment
On 3/4/2024 at 10:08 PM, DesignBloke said:

I found this post very helpful thank you. I know how to amend code to change details like colour, font size etc, but having access to it in the first place to then change is a life saver. Thank you. 

I've used an amended script for www.strathearnengineering.com

So did you solve or still need help? If still need help, what is your problem now?

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.