Jump to content

Adding second button in header

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hi!

Looking for a way to add a second button directly to the left of the 'EMAIL US' button, which will appear on every page across the site. So it should look the same, but instead of 'EMAIL US' it should have the phone number, as you can see in the mockup i've made on the homepage.

Instead of the mockup I've made on the homepage, I'd like it to be next to 'EMAIL US' and appear on every page as part of the header.

Website is www.brainboxlearning.co.uk, password is brainbox

Thanks 🙂

  • Replies 6
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

Posted
9 minutes ago, tuanphan said:

You can follow this

 

Like magic! This worked BUT any way I can make it match the button next to it?

Thanks

Posted
20 hours ago, tuanphan said:

I see you already figured it out?

image.png.93cd726b9c064919096704db41403ffe.png

@tuanphan yes, that bit anyway! I’m struggling with how to add a small gap between the two buttons though? They’re touching at the minute which is too close.

I’ve also used some code so they display on mobile, but again, I’d love a small gap. Ideally (on mobile) the logo on the far left, the hamburger menu on the far right, and the two buttons completely centered. Any suggestions?

  • Solution
Posted
On 3/26/2024 at 11:53 AM, DomGape said:

@tuanphan yes, that bit anyway! I’m struggling with how to add a small gap between the two buttons though? They’re touching at the minute which is too close.

I’ve also used some code so they display on mobile, but again, I’d love a small gap. Ideally (on mobile) the logo on the far left, the hamburger menu on the far right, and the two buttons completely centered. Any suggestions?

You can use this code to Website > Website Tools > Custom CSS

div.header-display-desktop a.btn:nth-child(2) {
    margin-left: 1.5vw !important;
}

With mobile, use this CSS code

@media screen and (max-width:991px) {
.header-title-nav-wrapper {
    order: 1 !important;
    flex: unset !important;
}

div.header-burger {
    order: 3 !important;
    flex: unset !important;
    right: 0 !important;
}

.header-actions.header-actions--right {
    order: 2 !important;
    flex: unset !important;
    left: 50% !important;
    position: absolute;
    transform: translateX(-50%) !important;
    width: unset !important;
}

.header-mobile-logo {
    padding: 0 !important;
}

.header-display-mobile {
    justify-content: space-between !important;
}
}

image.png.64317f779da94c1ba05471b53b9bf06e.png

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!)

Posted
3 hours ago, tuanphan said:

You can use this code to Website > Website Tools > Custom CSS

div.header-display-desktop a.btn:nth-child(2) {
    margin-left: 1.5vw !important;
}

With mobile, use this CSS code

@media screen and (max-width:991px) {
.header-title-nav-wrapper {
    order: 1 !important;
    flex: unset !important;
}

div.header-burger {
    order: 3 !important;
    flex: unset !important;
    right: 0 !important;
}

.header-actions.header-actions--right {
    order: 2 !important;
    flex: unset !important;
    left: 50% !important;
    position: absolute;
    transform: translateX(-50%) !important;
    width: unset !important;
}

.header-mobile-logo {
    padding: 0 !important;
}

.header-display-mobile {
    justify-content: space-between !important;
}
}

image.png.64317f779da94c1ba05471b53b9bf06e.png

Perfect, thank you so much!

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.