3

I have made an ,htaccess file in my /font directory with only this line in it (as part of troubleshooting).

AddType text/css .css

None the less Google Chrome (even 19.0.1053.0 canary) reports that the .css files are returned as: MIME type text/html

http://paulanorman.com/:11 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://paulanorman.com/fonts/iwona-stylesheet.css".

I use Hostgator and have checked in Cpanel that text/css is default on my server for .css

I have also checked using wget on cygwin bash shell and the documents are indeed coming down as text/html

These stylesheets are being ignored. However I have found if I

<style ..>
 <?php include "dah dha / style-sheets.css" ?>
</style>

one by one in the head of my document all is fine.

However I would like not to have to do that.

Any one solved this? I have read much all over the net about this and it appears as an unexplained fickle problem it seems.

TIA paul

8
  • 1
    I've actually opened each .css in HTMLKit from the web and live saved them back unedited and now everything works fine, so I suspect it is some sort of charset issue. Thing was that for weeks this worked fine, then (automatic Browser(s) updates?) suddenly font .css would not load properly, and absolutely nothing had been changed by me any where. Commented Feb 27, 2012 at 9:36
  • I'm experimenting adding to the .htaccess AddType text/css; charset=UTF-8 css Are Browsers especially Chrome, expecting utf-8 by default now? Commented Feb 27, 2012 at 9:54
  • You need to use AddCharset utf-8 .css .js to add the charset, not AddType. Also do you use none-ascii characters in you css? If not, than there is no need/use to specify utf8. Commented Feb 27, 2012 at 15:53
  • I do not use non-ascii, but the files were being treated as if the Browsers could not recognise them. I am now wondering of there was a BOM at the file head added by and editor? This is why --- "I've actually opened each .css in HTMLKit from the web and live saved them back unedited and now everything works fine" Commented Feb 28, 2012 at 20:42
  • Looks like according to www.askapache.com this is ok as a one step process with the quote marks AddType 'text/css; charset=UTF-8' css Is there a known problem with that? Commented Feb 28, 2012 at 23:22

1 Answer 1

2

According to www.askapache.com this is ok as a one step process with the quote marks

AddType 'text/css; charset=UTF-8' css

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.