Welcome Guest, Not a member yet? Register   Sign In
Css links.
#11

[eluser]Craig A Rodway[/eluser]
For reference, this is what I do in my main template:


Code:
<base href="<?php echo $this->config->item('base_url') ?>web/" />
<link rel="stylesheet" type="text/css" media="all" href="css/style.css" />

This is my directory structure:

Code:
- index.php
- system
- web
  + css
  + img
  + js

So http://server/ci/ is the CI installation. The BASE tag sets the location to the CI installation then the web/ sub-folder. All CSS, Javascripts and images are loaded relative to that.

Example:
Code:
<img src="img/foobar.jpg">
#12

[eluser]luben[/eluser]
[quote author="puddles" date="1259206396"]Luben, where did you locate in your directory structure the .htaccess file?

Thanks....[/quote]

Hello, it's in the main folder just like it comes from code igniter installation. i haven't altered the directory structure, and css folder is on the same level as the main index.php and .htaccess files:

e.g.:

Code:
.
..
css        [dir]
img        [dir]
system     [dir]
index.php  [file]
.htaccess  [file]




Theme © iAndrew 2016 - Forum software by © MyBB