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
  • Views 585
  • 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).

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.