PlenitudPR Posted May 27, 2020 Share Posted May 27, 2020 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! Link to comment
tuanphan Posted May 28, 2020 Share Posted May 28, 2020 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 Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
PlenitudPR Posted May 28, 2020 Author Share Posted May 28, 2020 Tuanphan, Thanks for this suggestion! It makes total sense and is working perfectly. Very grateful for the support! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.