Are you absolutely sure that your CSS targets the actual image URIs? In other words, if your CSS is part of the HTML document itself, your images should be in a folder called images relative to the current HTML document.
However, if this CSS is part of the external stylesheet, which is located in the css folder, you need to use a relative path that will go one level to access the images.
css -> stylesheet.css images -> collection.jpg page.html
Your stylesheet should contain background-image rules in the following format
background-image: url('../images/collection.jpg');
By the way, using separate images for what you are trying to achieve is not such a good idea for at least two reasons:
- Each image represents an additional browser request - too many requests may clutter the page’s home screen
- Additional images are downloaded only on demand (when you move the mouse over the link, click it, etc.), which will lead to an ugly flickering effect in time when the requested image is actually loaded.
So use CSS sprites to fix both of these problems.
source share