Jump to content

How do I change the navigation bar background color for the homepage only?

Recommended Posts

17 minutes ago, noodles22 said:

Site URL: http://jscagsupply.squarespace.com

How do I change the navigation bar background color for the homepage only? I want the homepage navigation bar background color to be different than the rest of the pages. Can you please help me with this?

pw is testing123.

 

Thanks!

.homepage .header.white {
    background-color: #e1e6a9 !important;
}

You can use this custom css

.homepage .header.white {
    background-color: #e1e6a9 !important;
}

image.thumb.png.8411d1ea178fb2c579bd58112660e7c9.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
  • 4 weeks later...
13 hours ago, Darrenmsp said:

is there a code to apply this to the entire site? when my pages load, they load with a grey background before changing to my set color.

try this

Quote

.header{ background-color: #e1e6a9 !important; }

 

Edited by tuanphan

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
  • 9 months later...

@BrookeSansone

Please post the URL for a page on your site where we can see your issue.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works.

Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

@BrookeSansone

I suggest making the default color for the text and other bits black for the header using the SS interface.

Then we can give the code turning them white on the home page.

The idea is to choose a default color (black) that will cover the most number of pages and then write CSS to change the homepage only, instead of the other way around, which may require more CSS.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Add the following to Design > Custom CSS.

/*

  begin home page header navigation white
  
  Version     : 0.1d1
  
  SS Version  : 7.1
  
  By          : Thomas Creedon < http://www.tomsWeb.consulting/ >
  
  */
  
  body.homepage:not( .header--menu-open ) .header-nav-wrapper a,
  .homepage.primary-button-style-outline .header-actions .btn
  
    {
    
      color : white;
      
      }
      
  .homepage.primary-button-style-outline .header-actions .btn {
  
    border-color : white;
    
    }
    
  .homepage.primary-button-style-outline .header-actions .btn:hover {
  
    background-color : white;
    color : black;
    
    }
    
  body.homepage:not( .header--menu-open ) .header-actions .icon--fill svg {
  
    fill : white;
    
    }
    
  /* end home page header navigation white */

Let us know how it goes.

Edited by creedon
version 0.1d1

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 1 month later...
On 12/8/2020 at 1:51 PM, bangank36 said:
.homepage .header.white {
    background-color: #e1e6a9 !important;
}

You can use this custom css

.homepage .header.white {
    background-color: #e1e6a9 !important;
}

image.thumb.png.8411d1ea178fb2c579bd58112660e7c9.png

Hey there! Having trouble applying this to my site. I'd like the homepage menu to have a 0.2 or so transparent black background, and the other pages to have the solid blue that they have currently. Can you take a look please? Thanks!

Site mock: https://pigeon-maracas-9ccm.squarespace.com/ 
Password: happy2021

 

Link to comment
35 minutes ago, travisandrew said:

Hey there! Having trouble applying this to my site. I'd like the homepage menu to have a 0.2 or so transparent black background, and the other pages to have the solid blue that they have currently. Can you take a look please? Thanks!

Site mock: https://pigeon-maracas-9ccm.squarespace.com/ 
Password: happy2021

 

My testing result

image.thumb.png.329904ef354fd1bb7b948023d5f0d46d.png

Try adding to your Home > Design > Custom Css

.homepage  .header-background-solid {
  background-color: rgba(94,152,177,0.2) !important;
}

Let me know how it works on your site

Support me by pressing 👍 if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
  • 8 months later...
On 12/8/2020 at 11:33 AM, noodles22 said:
On 12/12/2021 at 10:42 PM, bangank36 said:

My testing result

image.thumb.png.329904ef354fd1bb7b948023d5f0d46d.png

Try adding to your Home > Design > Custom Css

.homepage  .header-background-solid {
  background-color: rgba(94,152,177,0.2) !important;
}

Let me know how it works on your site

Support me by pressing 👍 if this useful for you

Hi! Im looking to have this navigation colour page only on my products shopping page, rather than the home page. I would like the banner to be teal, not white. Can you help? 

https://primitivek9.com/shop/p/pink-leopard-bow-tie

 

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.