Archived topic
How to add padding around button in main navigation?
3 replies · Started by crosby87 on May 10, 2021
Hi there,
I've added a button to main main navigation based on the documentation available on the website.
Given that I already have two lines above and beyond the primary navigation, the border around my button now touches those two lines.
Could you please help with how I can add some padding in between those lines? Screenshot: https://imgur.com/fENvLzx
I have the following code for the the lines above and below my main navigation:
/*Line above & below main navigation*/
.main-navigation {
border-top: 1px solid #eff1f2;
border-bottom: 1px solid #eff1f2;
}
Hi there,
in your Menu Button CSS - this rule:
.main-navigation .main-nav ul li.nav-button a {
background-color: #ffffff;
border: 2px solid #012269;
color: #012269;
line-height: 25px; /* reduce lineheight */
margin: 5px 0; /* add this property to add top-bottom margin */
}
Make the changes i have commented.
Works perfectly - thanks David!
You're welcome