Home > Blockchain >  The background picture does not appear on my site
The background picture does not appear on my site

Time:07-21

My background does not appear on my site :

.bg-dispersed {
    background-image: url("/images/jpg/bg_dispersed.jpg");
}
.bg-00 {
    background-image: url("/images/jpg/bg_home.jpg");
}

what is strange is that locally, it works.

Here is the URL of my site : https://overlap.ulb.be/public/

I have no error in the Firefox console.

I have this in my .env file :

ASSET_URL=https://overlap.ulb.be/public

The picture is inside the folder...

CodePudding user response:

In your css you have: background-image: url("images/jpg/bg_home.jpg");

But you need

background-image: url("../images/jpg/bg_home.jpg");

The path in style.css is relative to the css folder, not to the root.

CodePudding user response:

Possible solutions:

  • background-image:url({{asset('/images/jpg/bg_dispersed.jpg')}});
  • try to get 777 permission to storage/public folder
  • assign height and width to class bg-dispersed and bg-00
  • Related