gogogo gogogo - 3 months ago 6
CSS Question

Can't load css stylesheet in Codeigniter

I have main CSS stylesheet for CI views, when but when load another link and switch to another page, Codeigniter have problem to locate css style-sheet?

CSS is classically linked in header, did not used frameworks helpers like

base_url();

Answer

loading CSS will be

href= "<?php echo base_url()?>assets/css/stylesheet.css"

And file structure would be like this

application
assets
    css
        stylesheet.css
system
index.php

Note Make sure Base Url is set correctly.

Comments