Dynamically Resizing Scroll View

I want my horizontal ScrollView to resize with the height of its contents and the height of the scrollbar. I would like this because I would like for the content and scrollbar height to resize with the size of the window. I have a 1920x1080 monitor and a 2496x1664 laptop display, so the UI scaling issues become apparent quickly, and I like to have dynamic UI.

My issue is that no matter how much I fidget with the ScrollView top element, I can not get it to align the content container and scroll bar: ScrollView - Imgur

And, here are my settings: ScrollView Settings - Imgur

I would have ‘Align Items’ set to center, but then the scrollbar disappears for some reason. The part that riddles me the most, is that I was able to create a visual element that resizes dynamically with nearly the exact same settings: Test - Imgur

And the settings: Test Settings - Imgur

Any help is most appreciated.

You might need to set the flex sttins on the ScollView`s content container instead. You can do this via a uss selector .unity-scrollview__content-container {...} , or with inline styles in c# by setting the styles on myScrollView.contentContainer.style.xxx

Thanks, made me realize I had made changes to #unity-content-and-vertical-scroll-container. Turns out I had it set to absolute position for some reason. The ScrollView now resizes with its contents.

But, the scrollbar still disappears when I set #item-container’s “Align Items” to anything other than stretch. Any idea what’s up with that?

If I set the width to auto instead of 100% it seems to align how I need it to.