Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
LL-Studio

Jasper template - Keep Title & Navigation at Top when scrolling

Question

Posted (edited)

I'm using the Jasper template and I want to keep the menu bar at the top of the screen as I scroll down like this website https://www.etudes-studio.com/.

I've tried a lot of CSS codes I've found online but didn't work. Any help would be amazing! 

Edited by LL-Studio

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

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;
}

 


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0
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.


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0

@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;
}

 

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...