0

Possible Duplicate:
CodeIgniter - Loading CSS

I try load css file and it's not work. this is the link tag:

<link rel="stylesheet" type="text/css" href="application/styles/style.css" />

how i can do this?

1
  • 1
    check your path, use full path instead <link rel="stylesheet" type="text/css" href="{$baseurl}application/styles/style.css" /> Commented Sep 27, 2012 at 5:38

1 Answer 1

0

Make a folder outside the application folder Eg: resources/css/style.css and link it like below.

Then the folder structure will be like this,

-application
-resources
-system
-index.php

<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>resources/css/styles/style.css" />
Sign up to request clarification or add additional context in comments.

11 Comments

it's not work. base_url not work...
@user1702278 you have to declare it before using it..open application/config/config.php to change your base_url()
when you echo base_url(); what does it show? nothing? did you define $config['base_url'] in the config file (application/config/config.php)?
i change and it's dont work: Fatal error: Call to undefined function base_url() in C:\Program Files\EasyPHP-12.1\www\LearnIL\application\views\layout\header.php on line 16
how did you define the $config['base_url']? it should be like this if you are using localhost, $config['base_url'] = 'localhost/your_app'
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.