Full height without scroll bars (using NextJS13 layout)
Answered
Dovekie posted this in #help-forum
DovekieOP
Hello everyone. So I'm wondering how I could achieve the thing I mentioned in the title. I've been trying to work with h-full etc but I either get scroll bars or the content doesnt fit the screen. Any ideas ?
Here is my code:
Navbar:
Here is my code:
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en" className="h-full">
<body className="h-full">
<Navbar/>
{children}
</body>
</html>
)
}Navbar:
const Navbar = () => {
return (
<>
<div className="bg-primary">
<div className="text-2xl px-8 py-6 text-white">My app</div>
</div>
</>
);
};
export default Navbar;Answered by Dovekie
I've found a solution tho, I just changed the height of the navbar from full -> full -80px and it works
7 Replies
Try
min-h-screen and keep h-fullDovekieOP
where exactly should I use min-h-screen instead ?
Where ever you want the full height
DovekieOP
I tried it, still same thing :/
DovekieOP
I've found a solution tho, I just changed the height of the navbar from full -> full -80px and it works
Answer
DovekieOP
Thanks for your time tho
Ahh I misunderstood your question, but glad to see you found the solution