Next.js Discord

Discord Forum

Background image

Unanswered
Николя posted this in #help-forum
Open in Discord
This is a very simple question, but I was wondering what others would say)
There are two pages (About us, Store), each of these pages should have a different background, and the main page should have no background at all, what can you advise? Some say by changing the body, others by using the Image component + styling. What can you suggest?

4 Replies

Is the background an image? Gradiant?
Just image

in the main loyaut has
<html lang="uk">
<body className={inter.className}>
<Header />
{children}
<Footer />
</body>
</html>


The image must be the background for the Header children Footer
Rafeiro do Alentejo
If it's a background image, then don't use the image component. Use CSS to apply it as a background image over the area you want to have the background.
@Rafeiro do Alentejo If it's a background image, then don't use the image component. Use CSS to apply it as a background image over the area you want to have the background.
And if, for example, you need to put a background in the body?
I think you need to use this in layout or template, but how?