div h-full takes parent height even if there is a sibling in the same div TailwindCSS

Problem: My div containing my text content overflows its parent whit full height Desired: The height of the div containing text content to fill the rest of available height of its parent Code: https://stackblitz.com/edit/web-platform-7gwuv1?file=index.html
9 Replies
Wolle
Wolle•2y ago
If your text is to much, it will overflow, if you do not set overflow. The element you put h-full is 100% of its parent (just moved down a bit). If you want an element to take up the remaining space flex-grow may be the solution you are looking for.
Woutyboy3
Woutyboy3•2y ago
Changing the text amount does not change the size of its parent
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Woutyboy3
Woutyboy3•2y ago
No i am more referring to this:
Mannix
Mannix•2y ago
i think what you want is a h-full minus the height of the HEADER 😉
Woutyboy3
Woutyboy3•2y ago
How do i get that if i do not know the height of the header ?
Mannix
Mannix•2y ago
you can use js for it
Woutyboy3
Woutyboy3•2y ago
I think i fixed it ... By making the div containing header and body a Flex dir-col fixed it :p
Mannix
Mannix•2y ago
just grid would also work i guess but flex is better option
Want results from more Discord servers?
Add your server