Jump to content

Customising Header Button Style

Recommended Posts

Posted

Hi,

Im currently working on my website. Its still in its development stages so it isn't live yet. I have a question that I would appreciate some help with.

My header is very standard, with a pages on the left, logo in the middle and button on the right ( as shown below with the attached images )

1497871382_Screenshot2021-11-24at14_13_32.thumb.png.cd3932518f5494c1741efad2cec452bb.png

 

Im attempting to style the "lets chat" button on the right to look like the linked page on the left. 

Initially it looks fine:107123114_Screenshot2021-11-24at11_05_10.png.93af416e96d02a148b84491e92378816.png

however when it hovers it shows a black background: 2043496771_Screenshot2021-11-24at11_05_18.png.02758e127199c2b65e83730ffea245cb.png

Would anyone be able to help me style this button so that it behaves the same as the linked page on the left, where upon hover the background doesn't change, only a line appears under the text.

 

Many thanks in advance!

  • Replies 9
  • Views 724
  • Created
  • Last Reply
Posted
24 minutes ago, Ewald_Rist said:

Hi,

Im currently working on my website. Its still in its development stages so it isn't live yet. I have a question that I would appreciate some help with.

My header is very standard, with a pages on the left, logo in the middle and button on the right ( as shown below with the attached images )

1497871382_Screenshot2021-11-24at14_13_32.thumb.png.cd3932518f5494c1741efad2cec452bb.png

 

Im attempting to style the "lets chat" button on the right to look like the linked page on the left. 

Initially it looks fine:107123114_Screenshot2021-11-24at11_05_10.png.93af416e96d02a148b84491e92378816.png

however when it hovers it shows a black background: 2043496771_Screenshot2021-11-24at11_05_18.png.02758e127199c2b65e83730ffea245cb.png

Would anyone be able to help me style this button so that it behaves the same as the linked page on the left, where upon hover the background doesn't change, only a line appears under the text.

 

Many thanks in advance!

Can you share your site with the protected password to check your issue?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted
2 hours ago, Ewald_Rist said:

Hi!

My website url is:  riststudio.com

the password is: welcome

If you want to set style for the 'lets chat' button, try adding to Home > Design > Custom Css

.header-actions-action [href*="contact"] {
  /*style the button*/
  padding: 8px 16px;
}

.header-actions-action [href*="contact"]:hover:before {
  /*style for the hover state*/
  border-radius: 10px !important;
}

Let me know how it works on your site

Press 👍 or mark this answer as solution to help another one too

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted

Hi!

Thanks for your response - it's greatly appreciated!

I've imputed the code into the custom Css section of my website, however upon hover the the button still shows a black back ground.

If possible I would like the button to remain the same on hover ( no background changes ), with the edition of a line appearing underneath. For example: 1776574323_Screenshot2021-11-24at17_25_27.png.5a128cba75c6937701cbc6cab029d685.png

Above is how the about me navigation looks on hover.

Many Thanks,

Ewald

Posted
46 minutes ago, Ewald_Rist said:

Hi!

Thanks for your response - it's greatly appreciated!

I've imputed the code into the custom Css section of my website, however upon hover the the button still shows a black back ground.

If possible I would like the button to remain the same on hover ( no background changes ), with the edition of a line appearing underneath. For example: 1776574323_Screenshot2021-11-24at17_25_27.png.5a128cba75c6937701cbc6cab029d685.png

Above is how the about me navigation looks on hover.

Many Thanks,

Ewald

Remove my previous codes and replace it with the following one

.primary-button-shape-pill .btn[href*="contact"]:hover {
  color: #000 !important;
}

.header-actions-action [href*="contact"]:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  left: 0;
  bottom: 0.1em;
  background-color: currentColor;
  transform: scalex(0);
  transform-origin: right;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.header-actions-action [href*="contact"]:before {
  content: none !important;
}
.header-actions-action [href*="contact"]:hover:after {
  transform: scalex(1);
  transform-origin: left;
}

Let me know how it works on your site

Press 👍 or mark this answer as solution to help another one too

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted

Hi! Thanks - This worked!

I have one more question that you could maybe help me figure out.

On the mobile view the menu displays as follows:

1638734610_Screenshot2021-11-25at10_21_27.thumb.png.df0e3e0670809aa3c994dccaf0192e5d.png

 

How do I make the 'about me' and 'lets chat' links the same size and display under each other?

Many Thanks,

Ewald

Posted
8 hours ago, Ewald_Rist said:

Hi! Thanks - This worked!

I have one more question that you could maybe help me figure out.

On the mobile view the menu displays as follows:

1638734610_Screenshot2021-11-25at10_21_27.thumb.png.df0e3e0670809aa3c994dccaf0192e5d.png

 

How do I make the 'about me' and 'lets chat' links the same size and display under each other?

Many Thanks,

Ewald

You can try

@media only screen and (max-width: 767px) {
  .header-menu-nav-folder-content {
    display: block;
    flex-grow: 0;
  }

  .header-menu-nav-list [data-folder="root"] {
    justify-content: center;
  }

  .header-menu-cta a {
    font-size: 8.5vmin;
  }
}

Hope that it can help your

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted

Thanks for your help! 

The contents of my mobile menu are arranged properly.

However the 'lets chat' link doesn't have an underline like the 'about me' link.

591752758_Screenshot2021-11-25at19_04_25.thumb.png.998604e46d326c420c57fd8e6d6d1946.png

Is there some more code I can input to make them the same.

You have been a great help so far!

Many thanks,

Ewald

Posted
On 11/26/2021 at 12:07 AM, Ewald_Rist said:

Thanks for your help! 

The contents of my mobile menu are arranged properly.

However the 'lets chat' link doesn't have an underline like the 'about me' link.

591752758_Screenshot2021-11-25at19_04_25.thumb.png.998604e46d326c420c57fd8e6d6d1946.png

Is there some more code I can input to make them the same.

You have been a great help so far!

Many thanks,

Ewald

Do you still need help?

You mean under let's chat when users on let's chat page?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.