@darion
To make style.css work well in CodeIgniter, follow these steps:
- Place your style.css file in the "assets" directory within your CodeIgniter project. If the "assets" directory does not exist, create one in the root directory of your project.
- In your CodeIgniter controller, load the URL helper by adding the following line of code in the constructor method:
$this->load->helper('url');
- In your view file, link your style.css file by using the base_url() function to specify the path to the "assets" directory.
- Make sure you have properly configured your CodeIgniter project to set up the base URL in the config.php file. In the application/config/config.php file, set the base URL to the root directory of your project:
$config['base_url'] = 'http://localhost/yourproject/';
- Finally, make sure your.htaccess file is correctly configured to remove index.php from the URL. This will ensure that the path to your CSS file is correctly resolved.
By following these steps, you can make your style.css file work well in CodeIgniter and render the styles properly in your views.