Jump to content

Custom navigation button with folder issue

Recommended Posts

Site URL: https://plenitudpr.org

Hi!

I have a multilingual site with 2 folders for each language, 1 folder on the primary navigation and 1 folder on the secondary navigation. I wanted to add a call to action button to the right of the header and added this code.

// Last 2nd Nav Item Orange Button //
.Header-nav.Header-nav--secondary a:last-child {
    background-color: #ffffff; /* button color */
      color: #ea7c3a; /* text color */
      border: 2px solid #ea7c3a;
    padding: 15px !important;
    border-radius: 2px,  
}

// Last 2nd Nav Item Orange Button HOVER //
.Header-nav.Header-nav--secondary a:last-child {
  background-color: #fafafa;
  color: #ea7c3a;
  border: 2px solid #ea7c3a;
}
.Header-nav.Header-nav--secondary a:last-child:hover {
  background-color: #ea7c3a;
  color: white;
}

The button turned out great, however, the last item inside the folder I have on the secondary navigation is displaying the same formatting. How can I fix this so that the button formats only show on the call to action (secondary navigation item), and not inside the last folder item.

Any help is greatly appreciated!

Edited by Plenitud
Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Edit to

// Last 2nd Nav Item Orange Button //
.Header-nav.Header-nav--secondary a[href="/donate"] {
    background-color: #ffffff; /* button color */
      color: #ea7c3a; /* text color */
      border: 2px solid #ea7c3a;
    padding: 15px !important;
    border-radius: 2px,  
}

// Last 2nd Nav Item Orange Button HOVER //
.Header-nav.Header-nav--secondary a[href="/donate"] {
  background-color: #fafafa;
  color: #ea7c3a;
  border: 2px solid #ea7c3a;
}
.Header-nav.Header-nav--secondary a[href="/donate"]:hover {
  background-color: #ea7c3a;
  color: white;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.