Jump to content

Hiding the drop shadow behind the main navigation only on blog pages

Recommended Posts

Site URL: https://tomato-purple-zmyk.squarespace.com/

I'd like to hide the drop shadow that I have set behind my main navigation only on blog pages as those are the only pages on my site that will not have hero images. I've figured out the code to have a solid background appear only on those pages so that the main navigation is visible. Unfortunately, while the below code works to remove the drop shadow, it removes it from every page on the site. Any insight as to how to target it to the blog pages (main blog page with all posts as well as individual blog post pages) would be appreciated. 

site pw: HBSnew2021!

//BLOG ITEM REMOVE DROP SHADOW//
.blog-item .basic-blog-grid-item 
.header .header-dropshadow, .header .header-announcement-bar-wrapper .header-background-gradient, .header .header-announcement-bar-wrapper .header-background-solid, .header .header-announcement-bar-wrapper .header-blur-background {
  height: 0% !important; 
  }

Edited by ann_nola
Link to comment
  • ann_nola changed the title to Hiding the drop shadow behind the main navigation only on blog pages
1 hour ago, ann_nola said:

Site URL: https://tomato-purple-zmyk.squarespace.com/

I'd like to hide the drop shadow that I have set behind my main navigation only on blog pages as those are the only pages on my site that will not have hero images. I've figured out the code to have a solid background appear only on those pages so that the main navigation is visible. Unfortunately, while the below code works to remove the drop shadow, it removes it from every page on the site. Any insight as to how to target it to the blog pages (main blog page with all posts as well as individual blog post pages) would be appreciated. 

site pw: HBSnew2021!

//BLOG ITEM REMOVE DROP SHADOW//
.blog-item .basic-blog-grid-item 
.header .header-dropshadow, .header .header-announcement-bar-wrapper .header-background-gradient, .header .header-announcement-bar-wrapper .header-background-solid, .header .header-announcement-bar-wrapper .header-blur-background {
  height: 0% !important; 
  }

Hi, it may be because you missed a few brackets in your code. Try this instead and let me know how it goes 🙂 

.blog-item .basic-blog-grid-item {
  .header .header-dropshadow, .header .header-announcement-bar-wrapper .header-background-gradient, .header .header-announcement-bar-wrapper .header-background-solid, .header .header-announcement-bar-wrapper .header-blur-background {
    height: 0% !important; 
  }
}

Please give this a 👍 if it helps. Make sure to quote me or tag me in your reply, otherwise I won't be notified.

Link to comment

@Jia Thanks so much for the code tweak! I had actually tried that and with the additional brackets, the drop shadow remains on the blog pages. I have the code you suggested in the custom css now. Any other thoughts as to how to remove the shadow only from the blog pages?

Edited by ann_nola
Link to comment
1 hour ago, ann_nola said:

@Jia Thanks so much for the code tweak! I had actually tried that and with the additional brackets, the drop shadow remains on the blog pages. I have the code you suggested in the custom css now. Any other thoughts as to how to remove the shadow only from the blog pages?

Try adding this to the Blog's Page Header + Post Blog Item Code Injection (Page Settings > Advanced):

<style>
.header .header-dropshadow, .header .header-announcement-bar-wrapper .header-background-gradient, .header .header-announcement-bar-wrapper .header-background-solid, .header .header-announcement-bar-wrapper .header-blur-background {
  height: 0% !important; 
}
</style>

Let me know how it goes 🙂 

Please give this a 👍 if it helps. Make sure to quote me or tag me in your reply, otherwise I won't be notified.

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.