Jump to content

Adjusting border on nav bar on anything but landing page

Recommended Posts

Hello everyone,

I'm currently working on a site where I've put the call to action button in a pill-shape like this:

.Header-nav.Header-nav--primary .Header-nav-inner > a:last-of-type, .Mobile-overlay-nav.Mobile-overlay-nav--primary > a:last-of-type {
   border: 2px solid white;
   padding: 10px 30px;
   border-radius: 300px;
 }

 

The only issue is that on all other pages but the landing page the background is also white! Please can someone help me write a code to have a white border on the landing page, but black on all other pages.

 

Thank you so much in advance

Link to comment
  • Replies 7
  • Created
  • Last Reply

Change your Custom CSS so the border is #999 instead of white so that you have a darker border on all the other pages. Then repeat the code, with the border set to white, prepending the selectors with '.homepage'. This will ensure the homepage is white instead. 

Let me know if you need more specific advice.

Your site using using a Brine-family template btw, which includes what Squarespace refer to as the 'Custom Template' (sites made by answering questions instead of picking a design).

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
On 11/16/2019 at 8:05 AM, NEWeOffset said:

I believe it's a custom template!

Goes live today anyway but I think it would be a lovely touch

here's the full code if you want to copy and paste - exactly what @paul2009 suggested. If you ever add a background to any other page you will have to tweak the code again. 

.homepage .Header-nav.Header-nav--primary .Header-nav-inner > a:last-of-type, .Mobile-overlay-nav.Mobile-overlay-nav--primary > a:last-of-type {
   border: 2px solid #fff;
   padding: 10px 30px;
   border-radius: 300px;
 }

.Header-nav.Header-nav--primary .Header-nav-inner > a:last-of-type, .Mobile-overlay-nav.Mobile-overlay-nav--primary > a:last-of-type {
   border: 2px solid #999;
   padding: 10px 30px;
   border-radius: 300px;
 }

 

Link to comment

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.