Offset triggered header active without scrolling on certain pages

Hi there,

my header has two bars, the second bar is sticky and changes bg colour and size on scroll.

https://www.amp-law.de

But now the very same header behaves awkward on certain pages, filiing the bar’s transparent background white. The problem occures on several pages, including the home page,
It seems as if a non-scrolled viewport is interpreted as being offset which is not the case. The background of the second bar shall only be white on scroll.

The problem occurred upon having to restore certain pages from trash due to some yet unknown plugin conflict …

Thanks!

Jens

HelloJens,

Thanks for writing in! I noticed that you are using #amp-first-content-section as your Sticky Bar selector. In one of your pages like this one, https://www.amp-law.de/kontakt-2/, there are 3 Sections with the same ID amp-first-content-section. Be advised that an ID must be unique and should NOT have any duplicates. Please remove or correct the IDs on the page where you have scrolling issues.

Kindly let us know how it goes.

Hi @ruenel,

You were right — the additional trigger ID was attributed to hidden sections. Upon deletion, the header works as expected.

Thank you for your help!

Jens

Hey Jens,

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.