I'm a huge fan of CSS!
Although it may seem like a simple task, I am completely stumped on how to tackle it.
Mission: My goal is to enable scrolling only within the List
section without affecting the entire page.
Here's the structure of my page:
<Stack>
<Box>Header</Box> // static height
<Box>Content</Box> // dynamic height
<List sx={{ overflow: 'auto', pb: '50px' }}> // dynamic height, need scroll only here
<ListItemText>Lorem Ipsum #1</ListItemText>
// ... more Lorem
<ListItemText>LAST LAST</ListItemText>
</List>
</Stack>
before scroll | after scroll |
---|---|
https://i.stack.imgur.com/Ya7Y4.png | https://i.stack.imgur.com/LeDpT.png |