tags:

views:

36

answers:

1

Hello,

Problem is about CakePhp. If I give permission to required directories CSS does not work. Sample URL: link text

Isn't this weird?

+1  A: 

It works in IE: It's a Firefox specific problem.

Your CSS file is not outputting the Content-type: text/css header, which makes Firefox ignore it as a style sheet. You will notice a warning to that effect in Firefox's error console.

I don't know Cake, but I'm sure there is a native way to remedy this.

A quick fix would be adding

<?php
  header("Content-type: text/css");

?>

to the top of cake.generic.css (if that is a PHP file).

If it's a real CSS file and not a rewritten URL (as I said, I don't know Cake), your web server doesn't seem to be taking care of sending the right content type - maybe something for the admin to fix.

If the admin can't fix it, you could try adding a .htaccess file to your project (or editing the existing one) containing

AddType text/css .css
Pekka
Oh thanks Pekka. I added below code to my .htaccess file.<FilesMatch "\.(css)$"> SetHandler text/css</FilesMatch>
Ahmet Kemal