Jump to content

add a circle border around the menu burger icon

Recommended Posts

Hi there, im looking to add a circle border around the burger menu icon but having difficulty.

 

the code im trying is: 

/* burger */
.burger-inner>div {
    width: 50% !important;
}

.burger-inner>div {
    left: unset !important;
    right: 0 !important;
}

.burger {border:1px solid #1d1d1d;
  border-radius:50%;
}

 

www.moonlitdesign.uk/home-old

Edited by moonlitdesign
Link to comment
  • Replies 3
  • Views 978
  • Created
  • Last Reply

Top Posters In This Topic

i've managed to get a circle border, but the close icon is in the wrong place. it needs nudging into the center of the circle / left. updated code:

 


/* burger */
.burger-inner>div {
    width: 50% !important;
}

.burger-inner>div {
    left: 0 !important;
    right: 0 !important;
}

.burger-box {border:1px solid #1d1d1d;
  border-radius:50%;
}

Link to comment
9 hours ago, tuanphan said:

Use this CSS code to move X to center

body.header--menu-open div.burger-inner>div {
    position: relative;
    left: -5px !important;
}

 

Hey @tuanphan ,

 

thank you so much!!!! i just had to edit the code slightly to this instead:

 

//close icon//

body.header--menu-open div.burger-inner>div {
    left: -6px !important;
}
 

//////

 

the position relative was making the icon not look like a cross for some weird reason haha so i just took it out.

 

all the best

 

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.