Error page stopped growing into the rest of the screen.
Unanswered
Ichneumonid wasp posted this in #help-forum
Ichneumonid waspOP
Hello, yesterday I posted about an issue I had related to my error pages introducing a scrollbar because Id like for it to take the entire screen height while take into consideration the fact that theres a navbar. So essentially the rest of the screen space left by the navbar. I was advised to do the following:
Essentially wrap my main content in a "flex min-h-dvh" In my layout.tsx, and
put "grow" In my error page. Which worked. However today when I run my project I saw that the same issue persisted when I never changed the code at all. Any ideas ?
<html lang="en">
<body className={inter.className}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<div className="flex flex-col min-h-dvh">
<Header />
{children}
</div>
</ThemeProvider>
</body>
</html>Essentially wrap my main content in a "flex min-h-dvh" In my layout.tsx, and
<div className="grid grow place-content-center bg-white px-4" >put "grow" In my error page. Which worked. However today when I run my project I saw that the same issue persisted when I never changed the code at all. Any ideas ?
19 Replies
Ichneumonid waspOP
Same
Makes no sense, yesterday this code produced the result I wanted. Today, without having touched it it does not
Its haunted then probably. Maybe try stopping the server and restarting and clearing cache and stuff
Also check devtools to see if something else is making it overflow
Ichneumonid waspOP
Meh nothing
And I have no idea how to debug this
Ichneumonid waspOP
yea theres no errors or anything
Yeah obviously no errors. Im just saying check the layout to see whats overflowing the layout.
Using dev tools
Ichneumonid waspOP
Nothing its just the error page trying to be screen height but since theres the navbar its gets pushed down so it goes over the screen. Theres no other element. Just the navbar and the error page
Did you try that "flex-1" instead of the grid grow tho?
Ichneumonid waspOP
yep
nothing changed
I dont know what's causing this then lol.
Is it maybe something to do with the content of the div itself?
Is it maybe something to do with the content of the div itself?
Try removing that padding too just in case, and playing around with the content inside div.
Maybe post the code below the navbar here