LL-Studio Posted May 3, 2020 Posted May 3, 2020 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!
tuanphan Posted May 4, 2020 Posted May 4, 2020 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 Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
LL-Studio Posted May 4, 2020 Author Posted May 4, 2020 Thank you @tuanphan but I tried to copy your code and it doesn't work.
tuanphan Posted May 5, 2020 Posted May 5, 2020 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 Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
LL-Studio Posted May 5, 2020 Author Posted May 5, 2020 @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; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.