![]() |
Problem with bootstrap - need help to integrate - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Problem with bootstrap - need help to integrate (/showthread.php?tid=66818) |
Problem with bootstrap - need help to integrate - blackbulldog - 12-07-2016 Hi, I've done my usual ... that is not set up a new CI project for over a year and now I've forgotten how to integrate bootstrap into it. I've got a folder under 'application' called assets. Assets has 3 sub-folders: css, fonts, js. These folders contain all the bootstrap and jquery files I'll need. In my view template I have the following: Code: <link rel="stylesheet" href="<?php echo base_url("assets/css/bootstrap.css"); ?>" /> which I'd hoped would be enough to find and use the files I need. Problem is, when I load the site there doesn't seem to be any of the bootstrap formatting being used. When I click on view page source and click on any of the links in the html - which looks like this: Code: <link rel="stylesheet" href="http://my.info/assets/css/bootstrap.css" /> Can someone tell me what I've missed? Thanks in advance. RE: Problem with bootstrap - can't find files - smccandl - 12-07-2016 The "assets" folder should be in the document root folder not in the application folder. Or you could add "application" to the path Code: <?php echo base_url("application/assets/css/bootstrap.css"); ?> If the page is being viewed directly in a browser the "base_url" is not necessary. You can change the links to be Code: <link rel="stylesheet" href="/assets/css/bootstrap.css" /> Hope that helps, Scott (12-07-2016, 05:20 AM)blackbulldog Wrote: Hi, RE: Problem with bootstrap - need help to integrate - blackbulldog - 12-07-2016 Hi Scott, That does help. I have a few strands of hair left, your advice means I can hang on to them - for a while anyway. Thanks a lot. RE: Problem with bootstrap - need help to integrate - maxcburger - 12-12-2016 Thanks for discussing this great matter here, really helpful. |