Make Top Panel Floating

Howdy,

whats the proper way of making top panel in layouts floating like in admin panel.

In admin panel it has css

position: fixed;
top: 37px;

is there more to this? Thank you

You need a little bit more. From the doc on microformats https://docs.cs-cart.com/4.6.x/developer_guide/core/front-end/microformats.html

cm-sticky-scroll - fixes a block in which it is used. In data-ce-top the distance scrolled from the upper end of the page till a block is fixed is specified. In data-ce-padding the distanse from the upper end of the screen to the fixed block is specified.

Format:



When the window is crolled down for 100px, the panel will be fixed at the distanse of 20px from its upper end.

Thank you for you input!

You need a little bit more. From the doc on microformats https://docs.cs-cart.com/4.6.x/developer_guide/core/front-end/microformats.html

cm-sticky-scroll - fixes a block in which it is used. In data-ce-top the distance scrolled from the upper end of the page till a block is fixed is specified. In data-ce-padding the distanse from the upper end of the screen to the fixed block is specified.

Format:



When the window is crolled down for 100px, the panel will be fixed at the distanse of 20px from its upper end.