14
Views
3
Comments
Solved
How to freeze container on the Screen (Mobile App)
Question

Hello,


Please kindly help. I want a container to stay on the top of the Screen when I scroll the Screen down.

I did not find such issue for Mobile Apps.


Thank you!

mvp_badge
MVP
Rank: #78
Solution

Hi Mikhail,

I created a sample app based on what João mentioned + with little bit changes and it's working as expected

See the attached .oml file


Hope this helps you!


Kind regards,

Benjith Sam

DemoAppListDemo.oml

Rank: #70

Hi Mikhail,


You just need to give the container, a class, let's called it sticky-top and then on your theme, you add the following CSS:


.sticky-top {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
}


The top being 0, means it will be starting from the top of the screen, you can put it a bit more down by increasing the top.
The left being 0 means it will be starting from the left of the screen, you can put it a bit more to the right by increasing the top.
The z-index will guarantee that it will appear in front of the text below when you scroll.


Hope it helps.


Cheers,

João

mvp_badge
MVP
Rank: #78
Solution

Hi Mikhail,

I created a sample app based on what João mentioned + with little bit changes and it's working as expected

See the attached .oml file


Hope this helps you!


Kind regards,

Benjith Sam

DemoAppListDemo.oml