CSS background image are not showing up

Why the css background image not showing up? I checked the image location are correct.

The HTML Code:

<section id="hero-image">

The CSS Code:

    background-image: url(img/Slideshow/slide.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;

>Solution :

In your CSS code, try changing the .hero-image to #hero-image. This is because you have defined "hero-image" as an ID. And you use #hero-image when searching for an ID within your HTML.

Leave a Reply