title: What path do I use to call a background image in codeigniter
body: <p>This is my root structure:</p>
  
  <p><img src="https://i.stack.imgur.com/ZnDN6.png" alt="enter image description here"></p>
  
  <p>And under the folder css, I have the file style.css</p>
  
  <p>I load my CSS file like this:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="&lt;?php print asset_url()?&gt;css/style.css"&gt;
  </code></pre>
  
  <p>I created a helper asset_url_helper that has this function:</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  if ( ! function_exists('asset_url()')) {
      function asset_url()
     {
      return base_url().'assets/';
     }
   }
  </code></pre>
  
  <p>And my .htacces file:</p>
  
  <pre><code>Deny from all
  RewriteEngine on
  RewriteCond $1 !^(index\.php|images|assets|robots\.txt)
  RewriteRule ^(.*)$ /index.php/$1 [L]
  </code></pre>
  
  <p>Loading the CSS file works like a charm, thats no problem.</p>
  
  <p>Now I want to call a background image from my style CSS something like this:</p>
  
  <pre><code>body {
      background-image: url('/assets/img/bg-admin.jpg');
  }
  </code></pre>
  
  <p>But this doesn't work</p>
  
  <p>Can someone tell me how I call the image file from CSS?</p>