background-image won't appear

arthur_barker

New member
Hi,

So I am making a website for the first time in atom, and I want to a section of my code to have a background image. I have put a pgn image in a folder and set the code to copy the path but the image won't appear, anyone know what is going on?

section {
background-image: url("C:\Users\Owner\Google Drive\Code\OpenforTheatre\Images\oftHeader.png");
background-color: steelBlue;
}


Cheers
 
If you're struggling to get the background image in your header to show up, don't worry Since that bit of code lives in your css folder, you will also need to remember to go up a level to get to the img folder, where your images are. Make sure to add to the front of the URL for your background image to work.
 
Back
Top