CodeIgniter Forums
[SOLVED] CSS file 'Not Found' and not working - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: [SOLVED] CSS file 'Not Found' and not working (/thread-43883.html)

[SOLVED] CSS file 'Not Found' and not working - El Forum - 07-26-2011

Yeah I fixed it, I had to...

added the following to .htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

and changed...

Source code in "header_view.php" to:
<link href="/css/NiftyLayout.css" rel="stylesheet" type="text/css" />

because with the first way using "base_url" and opening the css file in chrome the url would be:

Now it seems to be working along with javascript to so that's nice.

Hey, All

New to the CI and the forums. I am having an issue with CSS not loading. No matter what I try I get a error(from the browser) loading my style-sheet. And no error appears in my Apache error log.

Everything is under the webroot...
PATH TO css: css/NiftyLayout.css
PATH TO views: application/views/header_view.php

Source code in "header_view.php":
<link href="<?= base_url(); ?>css/NiftyLayout.css" rel="stylesheet" type="text/css" />

View source from browser:
<link href="" rel="stylesheet" type="text/css" />

Error when trying to view style-sheet source from browser:
NiftyLayout.css Failed to load resource: the server responded with a staus of 404 (Not Found)

.htaccess file could be stopping css views here it is...
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|css)
RewriteRule ^(.*)$ /index.php/$1 [L]

[SOLVED] CSS file 'Not Found' and not working - El Forum - 07-26-2011

I just tried your site using Google Chrome and it appears OK?

Did you fix it and not updated your post?