Bootstrap |
Hello guys
i need some help with my Code Igniter so its refusing to load up boot strap even after use of the url helper here is the code on the view: <link href="<?php echo base_url(); ?>/asset/css/bootstrap.css" rel=" stylesheet"> on the config file at autoload.php: $autoload['helper'] = array('url'); Thank you
link to css is 100% correct?
try to load url helper directly in controller: $this->load->helper('url');
06-25-2019, 07:59 AM
(This post was last modified: 06-26-2019, 02:49 AM by InsiteFX. Edit Reason: removed space )
Take off the slash / in front of asset/css/bootstrap.css
PHP Code: <link href="<?php echo base_url('asset/css/bootstrap.css'); ?>" rel="stylesheet"> Try that. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(06-25-2019, 02:36 AM)david kariuki Wrote: Hello guys You dont really have to anchor, just create a basic stylesheet link and make sure to place the asset folder in the root directory. That worked for me ![]()
You have a space in rel=" stylesheet". Remove it and see if that works.
Besides the bootstrap css, you also need to load jquery and the bootstrap js (javascript). I have a folder named "assets", with a subfolder named "bootstrap". That folder contains all javascript, css and other files needed for bootstrap. You must keep the bootstrap folder structure intact. |
Welcome Guest, Not a member yet? Register Sign In |