CodeIgniter Forums
Bootstrap integration issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: Bootstrap integration issue (/showthread.php?tid=86812)



Bootstrap integration issue - defg - 02-18-2023

Greetings, I have installed bootstrap through composer, and I have registered in the autoload the bootstrap path in the vendor folder, however when using the base_url() method I cannot access the path of the css file. Thanks in advance.


RE: Bootstrap integration issue - ikesela - 02-18-2023

copy all related file to public folder. its better.


RE: Bootstrap integration issue - InsiteFX - 02-19-2023

public
-- assets
---- bootstrap
---- css
---- js
---- vendor
---- etc;


RE: Bootstrap integration issue - Imam Sudiyatmo - 02-19-2023

Hello, could you post your root directory path in some VCS like github or gitlab?
maybe I can help you?


RE: Bootstrap integration issue - captain-sensible - 02-19-2023

if something is installed via composer, you shouldn't have to manually "register" anything , its done automatically

But which bootstrap ? I use SASS which is in vendor but i use gulpfile to move to public /css
Code:
function do1()
{
    
    
return gulp

       .src('node_modules/bootstrap/scss/*.scss    ')//takes scss from node modules & puts css in ui folder
       .pipe(sass())
       .pipe(concat('bootstrap.css'))
       .pipe(gulp.dest('public/css'))
    }


Then because i want to have some custom stuff with bootstap i do this in a file called style.css


Code:
@import url("bootstrap.css");
@import url("custom.css");
@import url("font-face.css");

The order means that same elements in both bootstrap and custom.css, custom will overwrite those of bootstrap


then in my single layout page i referecen the style.css which is in public/css dirs liek this

Code:
<link  rel="stylesheet" type="text/css" href="<?php echo base_url('css/style.css'); ?>   " />