DEV Community

loading...

Fixed sidebar - scrollable content

dimer191996 profile image Dimer BWimBA ・1 min read

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>
Enter fullscreen mode Exit fullscreen mode

Discussion (0)

pic
Editor guide