The background properties on my site are not loading

I have applied backgrounds to my hero section and navbar but neither of them are loading for some reason here is the link to the site link and the github repo

This will be your problem.

Hi @SamarthBagga thank for the post and welcome.

In addition to @nathanmartin’s pointer, if your image is located in the public folder, you can reference it as background-image: url("/hero-image.jpg"); in your CSS.

You don’t have to add the public path to the url. Just reference your path from the public folder. So for example since you have a folder called planet in your public folder, if you want to reference images from the planet folder, you just begin with "/planet/your_image_name_here.jpg"

Once you make the necessary changes for referenced images, let me know the outcome.


thank you it worked!

1 Like

thanks for coming back and confirming you found your solution!