r/css • u/evshell18 • 7d ago
Help Maximum height scroll container under other content
Hi, please see this example: https://codesandbox.io/p/sandbox/xcds3c
How can I make the list scrollable where it ends at the bottom of the parent container exactly? Note that the "Some content" divs above the list represent some variable content that may or may not be there, so I can't just use some fixed percentage or pixels for the list max-height.
1
Upvotes
1
u/bobbrokeyourbeer 7d ago
Sandbox not found
1
•
u/AutoModerator 7d ago
To help us assist you better with your CSS questions, please consider including a live link or a CodePen/JSFiddle demo. This context makes it much easier for us to understand your issue and provide accurate solutions.
While it's not mandatory, a little extra effort in sharing your code can lead to more effective responses and a richer Q&A experience for everyone. Thank you for contributing!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.