Make Height occupy the rest size page #2879
-
Hello, so as a beginner I'm trying to make a simple website structure and I find the "everyone's problem" with height. PS: The Sidebar and Main are fixed, is just a page with those 3 components and sidebar/main have indenpendent scroll Here is my really simple layout: So as I said if you could help me understading why I can't put the Sidebar and Main height to the bottom of the page and the better way to fix it I would be appreciated. Thank you for your attention. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Here's a play of a layout I've been working on: https://play.tailwindcss.com/eeTkKWQ86V What I do here is to set the main container to h-screen, then set the children to h-full. The right-hand area is a flex flex-col which contains the "header" and the main content. I then set the main content area to overflow-y-auto so that this area scrolls. The sidebar is also collapsible. It's not exactly like your layout, but hopefully you can dissect what I did to apply to your case. |
Beta Was this translation helpful? Give feedback.
Hi @AdrianoFSilva01
Here's a play of a layout I've been working on: https://play.tailwindcss.com/eeTkKWQ86V
What I do here is to set the main container to h-screen, then set the children to h-full. The right-hand area is a flex flex-col which contains the "header" and the main content. I then set the main content area to overflow-y-auto so that this area scrolls. The sidebar is also collapsible.
It's not exactly like your layout, but hopefully you can dissect what I did to apply to your case.