Search code examples
cssurlpathbackgroundbackground-image

background-image path css


I am having trouble to put a background-image on my website.

enter image description here

This is a Google Maps. So then I put a background-color (behind it): red; just to show you all what is going on:

section.middle{
background-color: red;

}

redbackground

But when I put a background-image it doens't show correctly:

section.middle{
background-image: url(/public/css/img/gymbackgroundhome.jpg);

}

nobackgroundimage

This is my workspace:

workspace

Thank you!


Solution

  • url() value in css has to be between quotes:

    section.middle{
        background-image: url("/public/css/img/gymbackgroundhome.jpg");
    }