SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question CSS not appearing in FF at all.

    Hello everyone,

    Hopefully someone will have an answer to this more then likely simple issue. Unfortunately, it is not so simple for me at this point.

    I have a site in which the CSS styling is appearing fine in IE however no style at all is seen in FF. The css is fine (good enough). I have checked the CSS with Rapid CSS and w3. In Rapid CSS there is an option to see what the styling looks like in different browsers. Everything checks out there.

    I also installed a FF extension called EditCSS which allows you to edit the CSS of any webpage and see the results in realtime (pretty neat extension). Everything checks out there as well. I am thinking it may be something with the DOCTYPE or Content Type perhaps? Below is the code I currently have set.

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="sitecss.css" rel="stylesheet" type="text/css">
    The site is located Here

    Thank you for any help!

    Mark

  2. #2
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Mark, why are you using tables for design when you have CSS?

    Validate your CSS:
    http://jigsaw.w3.org/css-validator/v...usermedium=all
    Verify your class/ID names some are not used in the Mark up etc...

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,475
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Is it just this page that doesn't display or are there are other pages and other sites of yours not displaying either?

    If so it could be a server issue where the server hasn't been configured to supply text/css instead of text/plain.

    Code:
    GET / HTTP/1.1[CRLF]
    Host: www.telmantec.com[CRLF]
    Connection: close[CRLF]
    Accept-Encoding: gzip[CRLF]
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5[CRLF]
    Accept-Language: en-us,en;q=0.5[CRLF]
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7[CRLF]
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2 Web-Sniffer/1.0.24[CRLF]
    Referer: http://web-sniffer.net/[CRLF]
    http://css-discuss.incutio.com/?page=MozillaCssMimeType

  4. #4
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul and thanks for your reply.

    It occurs on all pages of the site. I called the hosting company (verio) and they told me the hosting covers all of the different types of Content Type so the problem wasn't on their end.

    Any other ideas?

    Thanks,

    Mark

  5. #5
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This doesn't really help you solve the problem, but I checked your page in FF and you're right, the styles weren't applied. If I opened up my CSSEdit pane from the WebDev toolbar, however, the styles appeared. Closed it, and they went away again. Very strange.

  6. #6
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very strange indeed! It has me a bit stumped.

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,475
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by tyssen
    Closed it, and they went away again. Very strange.
    Well that supports my thoery because when you open the edit css then the file becomes a local file for you to edit and then the styles show.

    I have just copied your page and uploaded it to my server. When I leave the css linked to your css file the styles do not display in firefox. Then I uploaded the css file to my server as well and the page works fine from my server with no problems.

    Here's a quick test to see if it is a server issue.

    Upload these 2 test pages and see what happens in firefox..

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    
    <style type="text/css">
    body{background:red}
    </style>
    </head>
    <body>
    </body>
    </html>
    Then remove the css from the head to a css file called testcss.css:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <link href="testcss.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    </body>
    </html>
    Post the links when you have done it so we can see the results.

  8. #8
    SitePoint Member
    Join Date
    Jun 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul. I didn't think about doing that simple test

    The page does work with FF with the "inline" stylesheet and does not work using the external stylesheet. Here's the links:

    Page with inline stylesheet

    Page using external stylehseet

    So I'm assuming the hosting does not have the correct MIME type input.

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,475
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,
    So I'm assuming the hosting does not have the correct MIME type input.
    It does seem to be looking as though that is the problem.

    There is one more test you could try and that is to remove the doctype from test2 and then see if mozilla can see the css file because. According to the link below mozilla is more strict in strict mode and will ony obey what it is told. In quirks mode it may decide to run the stylesheet and then you should know that it is a mime type problem.


    http://css-discuss.incutio.com/?page=MozillaCssMimeType


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •