Pages

Wednesday, April 10, 2013

Add CSS in Codeigniter

1. First create a folder in root folder (where application, system these folder are placed).
2. Name it Modify(or anything you like).
3. Under Modify, create another folder named css.
4. In the css folder place your css file (like. style.css).
5. Go to config.php (application/config/config.php).
6. Change
               $config['base_url'] = '<>'; 
                                  (path and name of your project == <>)
7. Open autoload.php (application/config/autoload.php)
8. Change:
                from:
              $autoload['helper'] = array();
                to
              $autoload['helper'] = array('url', 'file');
9. Now link like below:
 
Hopefully your CSS file is linked