Background Image Won't Load

Heya People!

Anybody knows why the background picture isn’t being loaded?
It should look like this (and it does, but on localhost):

Here’s the code: GitHub - Anticrisis97/CatCulator

Hi @Anticrisis, thanks for the post
Looks like you used a wrong background image url path for the .container class in your styles.css file located at CatCulator/src/styles/styles.css

The correct path should be ../../images/kitki.jpg

Kindly update the background image from background-image: url("../images/kitki.jpg"); to background-image: url("../../images/kitki.jpg");

.container {
    width: 100%;
    height: 800px;
    border: 2px black solid;
    background-image: url("../../images/kitki.jpg");
    background-size: contain;
    border-top: 1px sandybrown solid;
    text-align: center;

Once you make the changes and redeploy the background image should diisplay.

Let me know the outcome.


It works, such a small mistake, yet such a big difference.
Thank You for your perceptiveness and time to look at the code.

1 Like

Hi @Anticrisis, I appreciate your kind words. It means a lot to me.
Glad my suggestions helped.

1 Like