Custom Sticky Header That Behaves Like Default Headers - Question | JoomShaper

Custom Sticky Header That Behaves Like Default Headers

ML

Mike Lawson

Helix Framework 3 years ago

Hello

I added my own custom header, labeled it "newheader" in my layout builder. I added the following custom css to make it "sticky"

#sp-newheader {
    position: fixed;
    z-index: 999;
    width: 100%;

This custom css makes it sticky when I scroll, but I noticed that it doesnt behave the same way as the default sticky header that comes with the template. Inspecting the default header shows position: relative, until you scroll down and the position shows "fixed". This keeps the header row above the contents below it, and not overlap the content (which is what's happening with my custom sticky header).

I was wondering how I could get my custom sticky header to behave like your default sticky header in that it doesnt overlap content? Ive included the URL and login credentials for the site in hidden content. Thanks in advance.

0
12 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 years ago #8261

Pavel has right, even we noticed that in Helix Ultimate documenation!

foto_5774_2021.jpg

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 3 years ago #8256

Hi, You can enable the sticky header portion from here Go to extensons--> Templates-->Template options -->Basic --> Header --> Enable sticky header --> https://prnt.sc/1067yfj

Thank you

0
Pavel
Pavel
Accepted Answer
3 years ago #8258

I was wondering how I could get my custom sticky header to behave like your default sticky header in that it doesnt overlap content?

Hi. It should have the name Header only, not newheader or something else.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 years ago #8260

Hello Mike Lawson

I have checked your site but found no issues with your custom header.

Best regards

0
ML
Mike Lawson
Accepted Answer
3 years ago #8346

Hello everyone. I understand the function and signficance of the default Header row, but was just experimenting with having a custom header to have multiple sticky rows and was hoping to get the custom one to function the same (position: relative -> position: fixed). Appears to be some additional JS involved so Im sure it's outside your scope of support. Thanks for your attention on this.

0
Pavel
Pavel
Accepted Answer
3 years ago #8353

You can do anything through CSS without changing the name Header.

0
ML
Mike Lawson
Accepted Answer
3 years ago #8355

Correct, however adding a custom sticky row requires customization

0
Pavel
Pavel
Accepted Answer
3 years ago #8357

Give an example. I think everything is achievable.

0
ML
Mike Lawson
Accepted Answer
3 years ago #8358

I already have. My original post includes details of what Im trying to achieve.

0
Pavel
Pavel
Accepted Answer
3 years ago #8361

I am not an employee of the support, so I can not have access to the hidden content ...

If css capabilities are not enough for what you want to achieve, then there is another way. Here's a starting point without renaming Header. Then your header will have all the same properties as the one that comes with the template. You have two predefined header styles. Copy all content from one of them and create your own predefined style. You can make any layout you want. At the same time, it will appear in the template settings.

0
ML
Mike Lawson
Accepted Answer
3 years ago #8362

Pavel. This is helpful, I will try your suggestion. Thanks

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 years ago #8418

Indeed, as we also informed in Helix documenation (FAQ & how to), you can build your own custom header.

but do not edit header1 nor header2 - craete your own "3" and use it.

BTW New, Alpha Helix Ultimate 2.0 have few predefined headers.

0