Bit of a silly question but I am not sure why this image is not being displayed.
The file structure goes as so in the blogs directory:
index.php
img <- this is a folder
css <- this is a folder
In the img
folder, I have the image: computer classroom.jpg
Now in my index.php file I have this code:
<div class="blogs-cover-img" style="background-image: url('./img/computer classroom.jpg');"></div>
And this is the css which is in the css folder:
.blogs-cover-img{
width: 100%;
height: auto;
background-size: cover;
}
The issue is that it does not display the image. When I inspect on the browser it gives me a 404 error, unable to find the image.
I also tried: img/computer classroom.jpg
and /img/computer classroom.jpg