CodeIgniter Forums
css - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: css (/showthread.php?tid=17698)



css - El Forum - 04-13-2009

[eluser]Unknown[/eluser]
how to add css file here?
please help me out.


css - El Forum - 04-13-2009

[eluser]bigtony[/eluser]
Put something like this in the HEAD portion of your HTML:
Code:
<style type="text/css">
  @import "<?php echo base_url().'assets/css/site.css'; ?>";
</style>
The above assumes your css is called 'site.css' and is in subdirectory 'assets/css/' where 'assets' is at same level as your 'system' directory. You can of course put it somewhere else if you want.


css - El Forum - 04-13-2009

[eluser]jedd[/eluser]
Or even using the CI function link_tag:

Code:
echo  link_tag('assets/stylesheets/COMMON.css');



css - El Forum - 04-14-2009

[eluser]bigtony[/eluser]
[quote author="jedd" date="1239638249"]Or even using the CI function link_tag:

Code:
echo  link_tag('assets/stylesheets/COMMON.css');
[/quote]
Somehow that function passed me by - much better than my suggestion, thanks!


css - El Forum - 04-15-2009

[eluser]Unknown[/eluser]
thanks !!