What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

background-image won't appear


New member

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;

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.