Welcome Guest, Not a member yet? Register   Sign In
CSS file is not loaded in view file
#1

[eluser]Magnusvb[/eluser]
Hello

This is my first try with CI. And I have some trouble with linking to css files. I have read a lot of the threads about this – but non of the solutions working for me. So here we go

I'm using MAMP pro and have created a virtual host "kattliv.ci", which points to the root:

- root (kattliv.ci)
- application
- config
- css
-images
(and all the other folders)
- system

In the config file, base url is set like this:
Code:
$config['base_url']    = "http://kattliv.ci/";

In the view file I'm calling a css like this:
Code:
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url();?>application/css/master.css">

Which in the output turns out like this:
Code:
href="http://kattliv.ci/application/css/master.css"

But the css file is not loaded in the view. And if I go to that url I get a 404.
I'm using a htaccess file to remove "index.php" (the one that is in the User Guide):

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

What am I doing wrong?

Regards, Magnus


Messages In This Thread
CSS file is not loaded in view file - by El Forum - 07-22-2009, 06:16 AM
CSS file is not loaded in view file - by El Forum - 07-22-2009, 06:51 AM
CSS file is not loaded in view file - by El Forum - 07-22-2009, 07:46 AM
CSS file is not loaded in view file - by El Forum - 07-23-2009, 12:40 AM
CSS file is not loaded in view file - by El Forum - 07-23-2009, 01:06 AM
CSS file is not loaded in view file - by El Forum - 07-23-2009, 05:42 AM
CSS file is not loaded in view file - by El Forum - 07-23-2009, 06:25 AM
CSS file is not loaded in view file - by El Forum - 07-23-2009, 07:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB