not able to overflow the div properly

hey folks I have this html
<Box display='flex' height={'calc(var(--vh, 1vh) * 100)'}>
<NavbarLayout />
<Main>
<TaskGrid />
</Main>
<TodayTasksLayout />
</Box>
<Box display='flex' height={'calc(var(--vh, 1vh) * 100)'}>
<NavbarLayout />
<Main>
<TaskGrid />
</Main>
<TodayTasksLayout />
</Box>
My problem is when the content in the div with name main overflows it looks like in the attached image so to solve that I tried setting overflow-y: auto on the main div but due to that the scrollbar comes is showing in the main div I want that scrollbar shows at the place shown in overflowing div image how do I do that
8 Replies
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
Aditya Kirad
Aditya Kirad14mo ago
nope I want that scrollbar showing in the second image should be at the place of scrollbar in first image
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
Aditya Kirad
Aditya Kirad14mo ago
yeah i want that body scrollbar for my middle div in case it overflows
Chris Bolson
Chris Bolson14mo ago
Have you defined the height on your "main" element?
Aditya Kirad
Aditya Kirad14mo ago
nope
Chris Bolson
Chris Bolson14mo ago
If it doesn’t have a defined height it will automatically adjust to fit the contents which is what is causing your body scroll. I’d you give it a defined height it should show the scroll bar where you want it.
Aditya Kirad
Aditya Kirad14mo ago
tried giving defined height but not working