Mozilla/Firefox + CSS problem

Discussion in 'CSS' started by mik977, Dec 20, 2005.

  1. #1
    Hi,

    I discovered that the CSS based website I've been developing is not working on Mozilla/Firefox browsers. The css file is not read (CSS is disabled). On IE on the other hand the page displays just fine. I browsed the internet extensively but no solution appears to address my issue, or I might have just overlooked something.

    What I discovered was:

    when I set

    1. <link rel="stylesheet" href="some loacal path/default.css" type="text/css" media="screen" />

    instead of

    2. <link rel="stylesheet" href="http://www.link-go.si/textpattern/textpattern/css.php?s=default" type="text/css" media="screen" />

    it works just as it should.

    I compared the RESPONSE headers from REQUESTS generated from both IE and Mozilla and found out that both returned the text/css as content type.

    If I type in the URL: http://www.link-go.si/textpattern/textpattern/css.php?s=default, the stylesheet is displayed. The URI is fine then. This was not a concern since the stylesheet is generated from a CMS.

    And finally, I checked the document against the tydi HTML checker. No problems are reported, document seems to be XHTML 1.0 Transitional as reported.

    Please feel free to check the website and/or sources. This is merely a test website.

    I will appreciate any hint upon how to resolve this issue.

    Thanks!

    Miha
     
    mik977, Dec 20, 2005 IP
  2. MikeH

    MikeH Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    When using php for a css file you need to add the following at the top of the file:

    <?php header("Content-type: text/css"); ?>
    Code (markup):
     
    MikeH, Jan 6, 2006 IP
  3. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #3
    I get a timeout when trying to examine the headers, but Mike's comment makes sense. Have you tried making it into a static css file and testing that?
     
    nevetS, Jan 6, 2006 IP