-1

I have a file called home.css that I want to assign a background image in:

background-img: url(".../my-img.jpg");

However, I'm getting errors that the file cannot be located due to the file location declared. I thought I got the correct amount of "..." but maybe not? Can anybody spot what's wrong considering the file structure below:

App
  home-app
    home
      home.css
Assets
  Images
    banner.jpg
T.Doe
  • 1,969
  • 8
  • 27
  • 46

2 Answers2

2

Every "../" = one catalog up, so if you want to get in "Images" then href should looks like: background-img: url('../../../Assets/Images/my-img.jpg');

0

use background-img: url("/Assets/Images/my-img.jpg"); it will work in any where.

Ved_Code_it
  • 704
  • 6
  • 10