Best way to have a footer in nextjs using App Router
Answered
Swedish Lapphund posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Swedish LapphundOP
So I've been looking around for a way to have a global footer on all pages, some work in
Layout.tsx
and some just add it per page. What is the right way to go about this granted I want to have the same footer everywhere?16 Replies
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
app/layout.tsx
should be the best place for that![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Swedish LapphundOP
![Image](https://cdn.discordapp.com/attachments/1191585731068563527/1191586433362825307/image.png?ex=65a5fa58&is=65938558&hm=a5492238af47b1fd383984d3b411ab39f695663b56ea0b3eb72cc942dd040acc&)
is there any way I can make it at the bottom of the page, despite the childeren objects being small and not tall?
in this case its just right below the actual content
which looks awkward when a page content isnt tall
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>
<AppRouterCacheProvider>{children}</AppRouterCacheProvider>
<Footer />
</body>
</html>
)
}
the icons are the footer right now, fyi
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
set the footer position to fixed, left 0, right 0, bottom 0
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Swedish LapphundOP
ah thank you!
I currently have the style just embedded into the code
I suppose a globals.css would be great
for this
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
yeah
btw, this will make the footer stay at bottom on every page, is that what you want?
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Swedish LapphundOP
yes, thats perfect
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Swedish LapphundOP
thanks!