A simple Tailwind layout to create a sticky sidebar and scrollable content next to it.
<div class="flex">
<aside class="h-screen sticky top-0">
// Fixed Sidebar
</aside>
<main>
// Content
</main>
</div>
A simple Tailwind layout to create a sticky sidebar and scrollable content next to it.
<div class="flex">
<aside class="h-screen sticky top-0">
// Fixed Sidebar
</aside>
<main>
// Content
</main>
</div>
For further actions, you may consider blocking this person and/or reporting abuse
Madza -
Matt Lewandowski -
Agbo, Daniel Onuoha -
Andrew Kang-G -
Top comments (5)
Thank you, sticky worked for me
How do I do exactly the opposite?
I want a scrollable sidebar and a "sticky" content
I have:
`
But actually this thing scrolls the main content along with the sidebar
Thank you, but not worked for me :(
another code :
Not worked !
Thanks! Exactly what I was looking for.
πThank you