Integrate Bootstrap on CodeIgniter
move bootstrap
folder on root location, because CI is understanding application
folder as controller
although application folder is restricted from client request by /application/.htaccess
file
|- |-application |-bootstrap//and use path as<?php echo base_url('bootstrap/css/bootstrap.min.css');?>
Here's the best guide I've found so far:How to include bootstrap in CI
In short:
Download bootstrap
Put it in an assets folder on same level as application folder
Also put jquery
Include css in header and jquery in footer of your templates:
<html> <head> <title>CodeIgniter Tutorial</title> <link rel="stylesheet" href="<?php echo base_url("assets/css/bootstrap.css"); ?>" /> </head> <body> <h1>H_E_A_D_E_R</h1>
and :
<hr/><em>© 2016</em><script type="text/javascript" src="<?php echo base_url("assets/js/jquery-3.1.1.js"); ?>"></script><script type="text/javascript" src="<?php echo base_url("assets/js/bootstrap.js"); ?>"></script></body></html>
Don't forget to include the CodeIgniter URL helper in your controller
$this->load->helper('url');