How to set background-image in codeigniter 3
<p>I started to use codeigniter few days ago and I am not able to set background image by css file.My controller(verifylogin.php) is this:</p>

<pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class VerifyLogin extends CI_Controller {

 function __construct()
 {
   parent::__construct();
   $this-&gt;load-&gt;model('user','',TRUE);
   $this-&gt;load-&gt;helper('url');
 }

 function index()
 {
   //This method will have the credentials validation
   $this-&gt;load-&gt;library('form_validation');

   $this-&gt;form_validation-&gt;set_rules('username', 'Username', 'trim|required|xss_clean');
   $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'trim|required|xss_clean|callback_check_database');

   if($this-&gt;form_validation-&gt;run() == FALSE)
   {
     //Field validation failed.  User redirected to login page
     $this-&gt;load-&gt;view('login_view');
   }
   else
   {
     //Go to private area
     redirect('home', 'refresh');
   }

 }

 function check_database($password)
 {
   //Field validation succeeded.  Validate against database
   $username = $this-&gt;input-&gt;post('username');

   //query the database
   $result = $this-&gt;user-&gt;login($username, $password);

   if($result)
   {
     $sess_array = array();
     foreach($result as $row)
     {
       $sess_array = array(
         'id' =&gt; $row-&gt;id,
         'username' =&gt; $row-&gt;username
       );
       $this-&gt;session-&gt;set_userdata('logged_in', $sess_array);
     }
     return TRUE;
   }
   else
   {
     $this-&gt;form_validation-&gt;set_message('check_database', 'Invalid username or password');
     return false;
   }
 }
}
</code></pre>

<p>while the view(login_view.php) is this one.</p>

<pre><code>&lt;html&gt;
 &lt;head&gt;
   &lt;title&gt;OpediaLab&lt;/title&gt;
 &lt;/head&gt;
 &lt;body&gt;
   &lt;h1&gt;&lt;/h1&gt;
   &lt;?php echo validation_errors(); ?&gt;
   &lt;?php echo form_open('verifylogin'); ?&gt;

&lt;link rel="stylesheet" type="text/css" href="&lt;?=base_url()?&gt;style.css"/&gt;
&lt;label for="username"&gt;Username:&lt;/label&gt;
     &lt;input type="text" size="20" id="username" name="username"/&gt;
     &lt;br/&gt;
     &lt;label for="password"&gt;Password:&lt;/label&gt;
     &lt;input type="password" size="20" id="passowrd" name="password"/&gt;
     &lt;br/&gt;
     &lt;input type="submit" value="Login"/&gt;
   &lt;/form&gt;
 &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>The css file contains just these two lines:</p>

<pre><code>body{
background-image: url("C:/wamp/www/CI/application/views/immagini/Opedia_LAB.png");
background-color: green;
}
</code></pre>

<p>Now, I'm pretty sure that the css file have to be in a specific folder (I have seen many tutorial, but not all say the same thing). The last attempt I made was to put the file in "views" as shown in the picture <a href="https://i.stack.imgur.com/SV6Fw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SV6Fw.png" alt="enter image description here"></a> </p>

<p>I hope I was clear enough, and I know, this is because I'm very new about this framework.</p>

<p>This is what I see at any attempt to change what I did. No errors but no css effect.</p>

<p><a href="https://i.stack.imgur.com/WqVLn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WqVLn.png" alt="enter image description here"></a></p>

<p>UPDATE:</p>

<p>This is what I get from the console:</p>

<p><a href="https://i.stack.imgur.com/vQaYM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vQaYM.png" alt="enter image description here"></a></p>