views:

967

answers:

5

I have a web page I am testing in both IE and FF. It works perfectly in IE but the style sheets will not load in Firefox.

Has anyone else experienced this type of issue with Firefox ?

Also note that this is only on my dev workstation loading the files locally...

Here is the header section of the html file:

<head>

<link  rel="stylesheet" type="text/css" href="\\server\USERS$\myID\Projects\Intranet\css\common.css">
<link  rel="stylesheet" type="text/css" href="\\server\USERS$\myID\Projects\Intranet\css\css.css">

<title>8927.html</title>
</head>
+1  A: 

CSS is handled differently in Firefox than it is in IE.

However, if your css should work fine in any browser, try:

  • Clearing your FF cache
  • Testing in Chrome or Safari

Does your page have any code which checks for browser type that may be stopping the CSS when it detects it is FF?

Cyclone
+4  A: 

UNC Paths

If you're linking to a file in a UNC path (e.g., \\servername\share\file.ext), you will need to specify the path thusly:

file://///servername/share/file.ext

Also note that you cannot link to file://///servername to get a listing of shares at that hostname due to a bug.

Source: http://kb.mozillazine.org/Links_to_local_pages_don%27t_work

SztupY
Btw. why are you using local UNC paths to the css file? Isn't there a better solution? (like using a webserver to handle file sendings?)
SztupY
This is just a staging location for HTML that ends up being moved into a production CMS.
Joseph
+1  A: 

ok I fixed it by using the following and it now works in both IE and FF:

<link  rel="stylesheet" type="text/css" href="../css/common.css">
<link  rel="stylesheet" type="text/css" href="../css/css.css">
Joseph
+1  A: 

A wild guess, since I can't replicate your environment: I wonder if Firefox is having problems with either the $ in path or the backslashes. I'd first try replacing backslashes with forward slashes, then I'd try URL-encoding the $ (i.e., replacing it with %24).

Dave W. Smith
+1  A: 

I've had a similar problem with javascript files from time to time. I think firefox is sometimes case sensitive, so make sure the path to your file and its actual name use the same capitalisation.

wheresrhys