Problem with bootstrap - need help to integrate |
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.
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,
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.
|
Welcome Guest, Not a member yet? Register Sign In |