Hi, I have a specific question about this project that is really bugging me and I can’t find the issue. I can get all of my images to work using relative paths EXCEPT when using the background-image property in CSS. In the code below, I commented out the background-image property in index.css that uses the absolute path (which works) because I have been trying to find a solution to why it won’t work when I use a relative path. I would love if someone could tell me what I did wrong!
Also, any other suggestions are welcome!
Dasimotos Art Project
HTML:Dasimoto's Art's & Craft'
<header> <h1>Dasmoto's Arts & Crafts</h1> </header> <main> <section> <h2 class="brushes">Brushes</h2> <img src="./Resources/Images/hacksaw.jpeg" alt="Paint Brushes"> <h3>Hacksaw Brushes</h3> <p>Made of the highest quality oak, Hacksaw brushes are known for their weight and ability to hold paint in large amounts. Available in different sizes. <span>Starting at $3.00 / brush.</span></p> </section> <section> <h2 class="frames">Frames</h2> <img src="./Resources/Images/frames.jpeg" alt="assorted picture frames"> <h3>Art Frames (assorted)</h3> <p>Assorted frames made of different material, including MDF, birchwood, and PDE. Select frames can be sanded and painted according to your needs. <span>Starting at $2.00 / frame.</span> </p> </section> <section> <h2 class="paint">Paint</h2> <img src="./Resources/Images/finnish.jpeg"> <h3>Clean Finnish Paint</h3> <p>Imported paint from Finland. Over 256 colors available in-store, varying in quantity (1 oz. to 8 oz.). Clean Finnish paint microbinds to canvas, increasing the finish and longevity of any artwork. <span>Starting at $5.00 / tube.</span></p> </section> </main>
I don’t know why it is not displaying the beginning of my html document when I paste it in but this is the head:
After two days of searching online I finally figured it out. it needed to be
background-image: url(“…/Images/pattern.jpeg”); and NOT background-image: url(“/Resources/Images/pattern.jpeg”);
Any and all feedback is still appreciated!