Jump to content

Jasper template - Keep Title & Navigation at Top when scrolling

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

It seems you solved with this code?

.header {
    position: fixed;
    left: 0;
    width: 100vw;
    z-index: 1000;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

I think you should edit to this

header.header {
    position: fixed;
    left: 0;
    width: 100vw;
    z-index: 1000;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
7 hours ago, LL-Studio said:

Thank you @tuanphan but I tried to copy your code and it doesn't work.

Both codes are the similar. However, in some templates, blog titles use the .header class. If you set position: fixed for .header, maybe it will fixed the blog title as well.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

@tuanphan I solved it, the problem was that in the Jasper template the header doesn't have background color, so I used this code to add it:

header#header {
    background: #ff0000;
    margin: 0 auto;
    padding: 3vw 5vw;
}

 

and after I used this code to keep the header when scrolling:

 
header#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
}
div#content {
    margin-top: 8vw;
}

 

 

 

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.