How to add background image to my Front End? #2143
Replies: 3 comments 9 replies
-
Via CSS, in your main CSS file: body {
background-image: url("xyzlocation");
} Note: Use a valid URL instead of |
Beta Was this translation helpful? Give feedback.
-
you can add them to your public folder, which is your root directory |
Beta Was this translation helpful? Give feedback.
-
@Benrockiee You can make a component of your background image and add it in index.js like other components, because if you try to include it directly it might give you a Hydration Error. Or you can try this way: Add this code in _document.js
Check line number 20, I have added a background color. Tailwind.config.js file:
I only added colors, you can add your image, under |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After lesson 10, i tried to add more features, I'm trying to add a background image to my Front End with Tailwind.css, but what i found online wasnt helping, please how do i go about this?
Beta Was this translation helpful? Give feedback.
All reactions