Set scrollview to container size

I am really confused - I have a number of containers on a page. The bottom container contains a scrollview, but however i set it - the scrollview is larger than that container.

I don’t know the size of the container (because it varies due to the content above it) so I just want to ensure that I have the scrollview entirely in the container. I know the container has resized to fit the window (Because I’ve put a border round it to see where it ends!), but despite setting the ‘flex shrink’ of the scroll view to 1 and the height to 100% it’s still larger than the container… HELP!!!

I’m guessing that the 100% doesn’t apply to the container, but to something else - but how do I set it to be 100% of the size of the container???

If anyone could help that would be great.

Oli

Set your scrollview Height 100%.

Thanks John - that’s what I thought - but it doesn’t work - it still overflows the container.

Oh you need to set the container style overflow property to Hidden

Cheers John - I’ll try that - now there are a number of containers (possibly too many) to make the design work - which one needs to have that set to hidden - all of them - or just the top level one?

The one immediately surrounding your scrollview.

Hey John - I think that’s cracked it - thanks so much!

1 Like