i am creating a google calender clone like calender i need some help

this is what i have got but i want the calender to take the height which is remaining of the whole vh after the nav bar took some height . how can i do that ? and there is an another thing i want to achieve . conditional positioning how can i do that with tailwindcss
No description
17 Replies
Chooβ™šπ•‚π•šπ•Ÿπ•˜
If the nav has a fixed height, use calc() to subtract the nav's height from 100vh and give that as the height of the calendar. If the nav does not have a known height, create a wrapper that holds both the nav and the calendar, and make the wrapper a flexbox with direction of column. Give the calendar flex basis of 100%.
indee
indeeβ€’15mo ago
it has a fixed height so calc() does tailwindcss has one
Chooβ™šπ•‚π•šπ•Ÿπ•˜
GeeksforGeeks
How to use calc() in Tailwind CSS ? - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
indee
indeeβ€’15mo ago
i have another doubt how to reduce the height of weekdays divs . it is in grid
megaByte
megaByteβ€’15mo ago
Do you mean just the first row?
indee
indeeβ€’15mo ago
ya
megaByte
megaByteβ€’15mo ago
Just put it in a seperate div ig One grid div for weekdays and other grid div for rest of the calendar
indee
indeeβ€’15mo ago
there can be another way ig
megaByte
megaByteβ€’15mo ago
or if you just want everything in one div then you can do min-h-[whatever calc() height ur setting] grid grid-cols-7 grid-rows-[24px_1fr_1fr_1fr_1fr_1fr]
indee
indeeβ€’15mo ago
any other way ? its looks filthy
megaByte
megaByteβ€’15mo ago
πŸ˜‚ ur doing tailwind bro
indee
indeeβ€’15mo ago
it looks filthy
megaByte
megaByteβ€’15mo ago
this is the least filthy code the "elegant" way would be the first approach i told you
indee
indeeβ€’15mo ago
its works so who cares ig hehe
megaByte
megaByteβ€’15mo ago
fair
indee
indeeβ€’15mo ago
so this is actually a appointment booking and they said its need a calender view its an assignment thanks for help dude
megaByte
megaByteβ€’15mo ago
np dude
Want results from more Discord servers?
Add your server