Hello all,
I have been reading the docs for codeigniter and have added it to my xampp server for learning. I have got the implementation of views and I wanted to start to make some templates for head and foot but I am having trouble adding an external css file.
I have not changed the base_url and I was wondering what I should make it if my css location is such:
C:\xampplite\htdocs\ci\application\css\main.css
Also, what is the best way to add an external css file? I have found most answers to say add the base_url() to the href= string, which is why I ask what the base_url() should be set to.
Thank you for your time.
EDIT:
I was able to resolve the issue by leaving the base_url(); blank and moving the css folder out of the application folder. I am not sure that it is the best thing to do but it now works with:
<link ... href="<?php echo base_url(); ?>css/main.css"></link>
I have been reading the docs for codeigniter and have added it to my xampp server for learning. I have got the implementation of views and I wanted to start to make some templates for head and foot but I am having trouble adding an external css file.
I have not changed the base_url and I was wondering what I should make it if my css location is such:
C:\xampplite\htdocs\ci\application\css\main.css
Also, what is the best way to add an external css file? I have found most answers to say add the base_url() to the href= string, which is why I ask what the base_url() should be set to.
Thank you for your time.
EDIT:
I was able to resolve the issue by leaving the base_url(); blank and moving the css folder out of the application folder. I am not sure that it is the best thing to do but it now works with:
<link ... href="<?php echo base_url(); ?>css/main.css"></link>