Make tailwindcss modal dialog with scrolling content? #3878
Replies: 2 comments
-
Did you mean to put the There are flexbox and grid solutions to "sticky header and footer". Here is a common minimal flexbox solution: https://codepen.io/henry/pen/mdRWyyY Its model is .wrapper {
display: flex;
flex-direction: flex-column;
height: the height for your design;
max-height: 100vh (and account for mobile browser ui if necessary)
}
.content {
flex-grow: 1;
} <section class="wrapper">
<header>...</header>
<div class="content">...</div>
<footer>...</footer>
</section> Don't forget accessibility! Your basic options are the edit: add html snippet |
Beta Was this translation helpful? Give feedback.
-
All modal is scrollable, but I need header and footer always be visible. Content must be scrollable. |
Beta Was this translation helpful? Give feedback.
-
Hello,
Basing on tailwindcss 2 modal example https://alpinetoolbox.com/examples/modal
I make modal dialog with header/footer/ Content with many rows.
I need header and footer always be visible. Content must be scrollable.
I try to set content with scrolling bar, like
But failed. Please take a look at codepen : https://codepen.io/sergeynilov/pen/vYyPrrE
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions