-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,839
  • 7
  • 21
  • 44

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
  • 664
  • 5
  • 9