[Support request] CSS background-image

Home Forums Support [Support request] CSS background-image

Home Forums Support CSS background-image

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #631891
    Theodore

    Hi,
    I am using the following style.css to display a background image for an individual page on my localhost xampp site:

    .page-id-364 {
    background-image: url(http://localhost:8080/minimum.com/wp-content/uploads/clouds_01.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    }

    1. The background image is not displaying.
    2. Using the Chrome Inspect to see the css. I notice a strike-through the style.css text for the image. (background-image: url(http://localhost:8080/minimum.com/wp-content/uploads/clouds_01.jpg);).
    3. The background-size and backgroumd-repeat display without strike-through in the Chrome Inspect.
    4. If I add a (background-color: blue;) to the style.css, the background becomes blue.

    So, why isn’t the background image displaying?
    Thanks .. Ted

    #631998
    Leo
    Staff
    Customer Support

    Hi there,

    The code itself looks good so hard for us to tell why it isn’t working without seeing it live unfortunately.

    Just making sure you aren’t adding the code to the theme’s style.css?

    It needs to be in child theme’s style.css or one of these methods:
    https://docs.generatepress.com/article/adding-css/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.