I need help with the height of a drawer content #4309
-
|
I'm having trouble creating a relatively simple layout. I'd like the content area to have a fixed size, with the navbar always at the top and the scroll only visible in the red area containing the content, so the client can only scroll within the content and the navbar remains visible. I've created a tailwind play with the summarized content; I'm not sure if it's a problem with the drawer component or if I'm doing something wrong (I would appreciate any help). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Instead of adding a new scrollable area, make the navbar sticky: Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
-
|
The easiest way would be to use a flex col with full height (watch on mobiles, maybe use 100dvh instead of h-screen). In the flex container add what you want on top and bottom, and make sure the element in the middle is |
Beta Was this translation helpful? Give feedback.
The easiest way would be to use a flex col with full height (watch on mobiles, maybe use 100dvh instead of h-screen).
In the flex container add what you want on top and bottom, and make sure the element in the middle is
flex-growand scrollablehttps://play.tailwindcss.com/bJ6M29Vawu