I've been attempting to incorporate an image into the PUG template engine of node.js
using CSS
, however, the image isn't showing up on the screen even though other properties are functioning correctly.
Here is the code from the .PUG
file section:
section#introsection
| Section for Pictures
And here is the CSS code included in the .PUG file:
#introsection{
background:center/cover no-repeat url("/static/bg.jpg") ;
color: white;
display: flex;
height: 300px;
background-color: lightgreen;}
The image is located in the Static Folder as demonstrated in the code. All other modifications made in the CSS file appear normally in the browser, but the image doesn't show up.
The error message displayed in the console is: localhost/:1 GET http://localhost/static/bg.jpg 404 (Not Found)