Jump to content

Multiple Header Buttons and One Linked to an Anchor Tag in Footer

Recommended Posts

Site URL: https://turtle-broccoli-z9zz.squarespace.com/config/design/custom-css

I have multiple buttons in my header, and I did this by using the code pasted below. In order for the code below to work, the buttons have to be linking to other pages. That works for one of my buttons/pages, but my other button needs to link to an anchor tag in the footer instead of a separate page.

Could someone (@tuanphan—I'm always grateful for your responses) help me with some code that would allow me to have two buttons in the header to the left of my social media links where one button links to the anchor tag in the footer ("Contact" in attached screenshot) and one button links to a page ("Login" in attached screenshot) with this also working on mobile?

Thank you so much!

— — —

// 2 Navigation Buttons //

.header-nav-item:nth-child(4) a, .header-nav-item:nth-child(5) a {
  background: #ffb549 !important;
  color: #FFFFFF !important;
  width: 80px;
  border-radius: 0px;
  text-align: center !important;
}

// Navigation Padding //

.header-nav-item a {
  padding: 8px !important;
}

// Active Navigation Line //

.header-nav-item--active a {
  background-image: none !important;
}

Screen Shot 2021-09-29 at 5.43.07 PM.png

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 9/30/2021 at 4:44 AM, Madisen said:

Site URL: https://turtle-broccoli-z9zz.squarespace.com/config/design/custom-css

I have multiple buttons in my header, and I did this by using the code pasted below. In order for the code below to work, the buttons have to be linking to other pages. That works for one of my buttons/pages, but my other button needs to link to an anchor tag in the footer instead of a separate page.

Could someone (@tuanphan—I'm always grateful for your responses) help me with some code that would allow me to have two buttons in the header to the left of my social media links where one button links to the anchor tag in the footer ("Contact" in attached screenshot) and one button links to a page ("Login" in attached screenshot) with this also working on mobile?

Thank you so much!

— — —

// 2 Navigation Buttons //

.header-nav-item:nth-child(4) a, .header-nav-item:nth-child(5) a {
  background: #ffb549 !important;
  color: #FFFFFF !important;
  width: 80px;
  border-radius: 0px;
  text-align: center !important;
}

// Navigation Padding //

.header-nav-item a {
  padding: 8px !important;
}

// Active Navigation Line //

.header-nav-item--active a {
  background-image: none !important;
}

Screen Shot 2021-09-29 at 5.43.07 PM.png

Your site is private now, you add to it a protected password to check it together

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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.