Skip to content

How to Add Drawer with Navigation bar without bottom extra space #3122

Answered by saadeghi
vishal-ainow asked this question in Q&A
Discussion options

You must be logged in to vote

In that case, if you want the navbar on top of the sidebar as well here are the changes you need to make:

  1. remove <main class="min-h-screen">
  2. Put back navbar out of drawer. I initially told you to put it inside, because I didn't know you want the navbar on top of the sidebar as well (thanks for the screenshot)
  3. Add h-[calc(100vh-4rem)] top-16 to drawer-side because your navbar is sticky and you won't want the sidebar to go under the navbar.
  4. Additionally there's an issue with your menu. Remove flex h-full flex-col overflow-auto. You don't need any of them. Add min-h-full so your menu covers the height.

Here's the fixed version:

https://play.tailwindcss.com/hzj8ex41Uf?size=1088x699

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@saadeghi
Comment options

Answer selected by vishal-ainow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants