Forum Moderators: not2easy

Message Too Old, No Replies

Firefox not reading external stylesheet

         

stevieB66

1:54 pm on Oct 17, 2005 (gmt 0)



I have built a web site using an external stylesheet - the site displays correctly when viewed on my local PC, but once uploaded and viewed on the net Firefox does not apply style to site. I have validated both html and css; both are ok. Works in IE on both local PC and the net. Can find no answer to this - any ideas? Could it be something to do with host server? I have built umpteen other sites using exactly the same head code etc, with no problems.

benihana

1:57 pm on Oct 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



is the stylesheet being parsed (e.g. by php)?

stevieB66

2:00 pm on Oct 17, 2005 (gmt 0)



Not sure exactly what you mean, but the site is static html and uses the following to link to stylesheet:

<link href="mgr.css" rel="stylesheet" type="text/css">

stevieB66

2:46 pm on Oct 17, 2005 (gmt 0)



I uploaded another of my sites to same webspace - it too is not displaying styles in Firefox or Netscape.
I guess we can conclude that since web sites which display correctly elsewhere, do not display on this webspace, there must be something amiss with ... what? Server configuration? What server settings would prevent Firefox reading external stylesheet, but not IE? I'd like to have some idea before I contact the web host.

Spat

2:57 pm on Oct 17, 2005 (gmt 0)



Try using absolute path... just to see if its works

Robin_reala

3:13 pm on Oct 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check whether your CSS file is being served as text/css. To check this, go directly to the CSS file on your web browser in Firefox and click Tools / Page Info. If it's not text/css under the type field you'll have to change the server settings.

stevieB66

3:25 pm on Oct 17, 2005 (gmt 0)



Absolute path does not work :(

I checked css file as suggested above - page info lists the file as text/html ... so this is the issue?
What server settings need to be changed, in this case?

Robin_reala

6:52 am on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In Apache you'd add this to your .htaccess file in the root of your web space:

AddType text/css .css

Apparently you can accomplish the same thing in IIS by right-clicking on your computer in the management console, selecting Properties / MIME Types then adding a new one.