Make Topmenu Show Up Again After Scrolling Down... - Question | JoomShaper

Make Topmenu Show Up Again After Scrolling Down...

AW

Anders Wiik

SP Page Builder 3 years ago

Hello.

I have a topmeny that is position: Relative and has a transparent background. The menu works fine when scrolled 100% to the top of the page since the background is dark and text is white. When scrolling down x pxs I'd like the menu to show up again bbut with a background color and the links with a new color.

Here is what I try to achieve: https://partillecup.com/sv/

As you can see the many has white text and transparent background but when scrolling down it appears again in new design. Is it possible to do this in pagebuilder?

/Anders

0
8 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 years ago #707

Hi, it's possible - with Helix Ultimate template, we used this effect many times in our templates. Just check the last two, Podcast and Wimble.

But SPPB wasn't in general designed for this. It's navigation addon don't add extra class name after page scroll-down.

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

In Template options > Basic > Header > Sticky Header: Yes

0
AW
Anders Wiik
Accepted Answer
3 years ago #709

Yes, I knew about how to make a it fixed 100% as your second answer. I use the ultimate template today. Where can I make the changes needed? I know how to set it fixed. But the color changes? I feel there need to be some more code?

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

Use custom CSS using this class

#sp-header.header-sticky

example:

#sp-header.header-sticky .container 
{background: white !important; box-shadow: 0 2px 4px rgba(7,37,68,.06);}

#sp-header.header-sticky .sp-megamenu-parent > li > a 
{color: black;} 

#sp-header.header-sticky .sp-megamenu-parent > li > a:hover 
{color: red;} 
0
AW
Anders Wiik
Accepted Answer
3 years ago #724

Awsome!

That's nice. It worked great but I realized the width of my header layer was not fluid so I changed to fluid width in my template layout settings. Now the color of the text changes color but the first but the background color doesn't. Any guess why?

What is triggering the switch between the two css? Can I moderate the timing?

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

Now looks OK, only maybe red shadow is too big.

0
AW
Anders Wiik
Accepted Answer
3 years ago #1069

Yes, I managed to figure out how to make it white. Is there any code I can change so that the white background menu shows up later? I mean after scrolling som distance....

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

Probably yes somehow but not easy, extra customization is needed. Personally I cannot help.

0