Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70924

Sticky content without using ion-list

$
0
0

In my Ionic app, I have an element I want to make sticky. Once the user scrolls the element into view, I want it to stay at the top of the screen no matter how far down the user scrolls.

I can’t get position: sticky to work.

I saw a thread on keeping content at the top, but the solution in that thread relies on ion-list. Is there a way to use sticky without using ion-list? Currently, my page consists of several divs and ion-toggle; the content I am trying to make sticky is a div tag that contains a single p tag and one line of text.

I’ve got a pretty complicated page structure and I hope to avoid rebuilding it to use ion-list just to make one thing sticky.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>