Cakephp - Loading a background-image css

Asked

Viewed 735 times

1

I’m not being able to upload my image to the Css Background

style.css - working, just not able to call this image

.layout{
    width: 100%;
    height: 230px;  
    position: relative;
    margin: auto;
    background-image:('../img/background.png');
}

o . htaccess - inside the webroot that

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

and html

<div class="layout">
      <div class="layout-image">
          <img src="img/layout.png" alt="">
      </div>
    </div>

1 answer

3


I believe the remote is missing url between the property background-image and the specified path;
Example: background-image: url('../img/background.png');

  • our such a gross mistake on my part, thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.