Welcome Guest, Not a member yet? Register   Sign In
Newbie to CI, don't know how to make External CSS work.
#1

[eluser]Unknown[/eluser]
Hi all:

I'm new to CI, I don't know how to link external CSS.

Link to the file: http://www.willrain.net/CI/index.php/soho/

I've tried
<link href="<?=base_url();?>css/bootstrap-responsive.css" rel="stylesheet">
But it seems halting on base_url function.

I have

$config['base_url'] = 'http://willrain.net/CI/';

If I do this
<link href="<?php echo "aaaa" ?>css/bootstrap.css" rel="stylesheet">
It will show, but of course( not properly linked to the CSS).

So I wonder if base_url function still exists? Is there any way to solve this?

Please advice.

Thanks.
#2

[eluser]xeroblast[/eluser]
http://ellislab.com/codeigniter/user-gui...l#link_tag

link_tag('css/external.css');
#3

[eluser]Unknown[/eluser]
Thanks, that works!!
#4

[eluser]Aken[/eluser]
Sounds like you didn't have the URL helper loaded.




Theme © iAndrew 2016 - Forum software by © MyBB