Jump to content

Header border, show only on scroll back / Hide it in starting position of the page

Go to solution Solved by Lesum,

Recommended Posts

Site URL: https://khaki-clementine-tm4r.squarespace.com/

Hello, I have built a website with a fixed header, which is shown only on scroll back. (Settings in the header design menu). I also set a border bottom to the header, which separates the header from the rest of the page.

But I would like to show this border ONLY ON SCROLL BACK. Or, which is the same, to hide it before the scrolling of the page starts.

Do you have any idea which code could work? Thank you very much!

Ruth from Munich

Pasted Graphic 1.jpg

Link to comment
  • Replies 2
  • Views 361
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

@rd1 Hi! You can add this code under Website > Pages > Website Tools > Custom CSS

.header .header-announcement-bar-wrapper .header-border[data-header-border="true"][data-header-usability-enabled="true"] {
    border: none;
}

.header.shrink .header-announcement-bar-wrapper .header-border[data-header-border="true"][data-header-usability-enabled="true"] {
    border: 1px solid var(--headerBorderColor);
    transition: all 0.2s ease;
}

 

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

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.