Jump to content

Custom code for mobile hamburger

Go to solution Solved by tuanphan,

Recommended Posts

Hi,

I have added custom CSS to my website for the hamburger and as you can see for desktop I have the width at 50% which is fine but for mobile it is also 50% which I don't want- can someone give a custom code so that on mobile the hamburger display on the whole screen (100%).

Also please can you give me a code to reduce the size of the text in both the desktop and mobile hamburger?

Thanks

https://www.wildingsnorthumberland.co.uk/

 

CODE BELOW:

.header .header-burger{display:flex}
.header-nav, .header-actions {display:none}
.header--menu-open .header-menu {
opacity: 1; visibility: visible; width: 60%;
margin-left: 50%;
box-shadow: -5px 5px 15px #000}

Edited by SeanCrafted
Link to comment
  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Don't remove any code in your current code. Add this to Design > Custom CSS
 

@media screen and (max-width:767px) {
.header--menu-open .header-menu {
    width: 100% !important;
    margin: 0 !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
On 5/26/2023 at 9:46 PM, SeanCrafted said:

perfect that's worked thank you


Do you have code to reduce text size in hamburger please for both desktop & moible?

Add this under

.header-menu * {
	font-size: 12px !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.