Black Friday 2026 50% off every plan Our biggest deal of the year on #1 Joomla products.
Ends in 12d 18h 14m 12s
Claim 50% off
Solved Templates

Helix3 sticky header and sticky topbar - need offset

Asked by Mia 4 years ago Last activity 4 years ago

Hello dear team,

we implemented a sticky header together with a sticky topbar, as described here https://archive.joomshaper.com/forums/sticky-top-bar-helix-3 , and it works so far.

Now we just want the headermenu also to become immediately fixed, before any scrolling, but it seems it still scrolls this new added 40 pixels up, before it jumps to the ok fixed position.

We guess an offset of minus 40 pixels for the scroll effect could do the job, but have no idea where to add (CSS, or in main.js?)
Please could you help us with this? Thank you very much!

Accepted answer

Marked as the solution
Mehtaz Afsana Borsha Staff

Please replace this line with following

var stickyNavTop = fixedSection.offset().top - 40   ;

8 more replies

Mehtaz Afsana Borsha Staff

Hi

You can follow this:

Path towards custom CSS: Extensions>Templates>Styles> Click on your current default template name then choose Template Options. Then find custom CSS within the custom code.

-Regards

Mia Asked this
4 years ago · edited

Hello,

thank you for your answer, but it didnt help. The question is, how we can avoid that the header (menu+logo) jumps on initial scrolling from visitor. The top-bar is fixed instantly, the header does a jump if the visitor scrolls down (about the same 40 pixels as added according to the other forumthread).

If you visit the site, and you start scrolling, you see the top-bar not moving, but the header moving for 40px before it jumps to fixed position (as it is the top-bar from beginning). We want to avoid this moving.
In coding words: We need an (minus)offset how to avoid this visual jump from the header on initial scroll from visitor (in css or js)

We know where and how to implement custom directives in custom css and main.js, thats not the question.

We need the position where and how to put this 40px offset in the code, so that the header stops jumping after 40px on scroll from visitor.

Thank you for your help

kind regards

Mehtaz Afsana Borsha Staff

Could you please give me a screencast of your issue?

Mia Asked this

Hello, here are some screenshots. The headermenu seems not to be fixed for the first few pixels scrolling. Thanks!!
https://we.tl/t-QMwuddenho

Mia Asked this

Thank you very much, it words perfectly !

Mia Asked this

Just reviewed, username "Jo80". All the best!

Mehtaz Afsana Borsha Staff

Thanks a lot

Log in to reply.