I do not upload the file from the css file [duplicated]

0

I do not know what happens if I am correctly linking the image to the body with the background-image property. On the other hand when I use it with style from the html in the body if the load is normal. This is the html:

<html>
     <head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/estilodrum.css">
<title>Drumbox</title>
  </head>
     <body>


        </body>
       </html>

And this is the CSS:

body{
background-image: url('img/concierto.png');

}

When I enter the console it shows me this error: Failed to load resource: net :: ERR_FILE_NOT_FOUND

What could it be?

    
asked by Raidmaster 25.03.2018 в 04:17
source

1 answer

0

Hi, try either of the two options, if your style sheet is only inside a folder, use the first option, if the second is 2 and so on.

    body{
background-image: url('./img/concierto.png');
}

    body{
background-image: url('../img/concierto.png');
}
    
answered by 25.03.2018 в 04:45