Jump to content

Targeting the last external link in navigation?

Go to solution Solved by Ziggy,

Recommended Posts

Posted

I've finally figured out how to make external links in my navigation become italic. But now I'd like to figure out how to only target the last external link (maybe using "child"? new to css haha) 

Here is the code I have working now:

.header-nav-item--external a {
    font-style: italic;
  }

Any ideas on what to add to make it so only the word "STUDIO" is italic in my nav?
Site is forhomeandharvest.com

Thanks for any help!!!

  • Solution
Posted

This would work, but be wary of adding or removing navigation items.

.header-nav-item:nth-child(4) {
  font-style:italic;
  font-weight:900;
}
  

Hope that helps!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted
On 1/18/2023 at 2:35 AM, Ziggy said:

This would work, but be wary of adding or removing navigation items.

.header-nav-item:nth-child(4) {
  font-style:italic;
  font-weight:900;
}
  

Hope that helps!

THANK YOU! This is perfect.

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.