Codeigniter makes it very simple to add a stylesheet to any given view. A simple loaction to keep all css files is in a new folder called css which can be made directly inside the codeigniter installation. However, the main page will have slightly different syntax than all other views. For example, if the route for the home page is for a controller named home_page.php, the header view would use the following syntax for the stylesheet:
Alternately, a controller file such as mycrud.php, the header file would have a stylesheet like:
However, if Codeigniter is installed in wamp or in a subfolder(like it comes out of the box), you may want to use ../css/mystyle.css for the path. Alternatively, for wamp and live websites., you can always use absolute paths such as http://mycodeigniterwebsite.com/css/mystyle.css or http://localhost/mycodeinitersite/css/mystyle.css.
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton