View Full Version : Firefox not loading css file but IE does.

Sep 20th, 2009, 08:53 PM
I'm having problems getting firefox to load a css file that is stored in a sub directory of the directory the html file is in. Internet explorer loads it without any problems. I can't for the life of me workout what is going wrong. :o:(

<!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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Page Title</title>
<link rel="stylesheet" href="css/slideshow.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.cycle.js"></script>
<script type="text/javascript" src="js/slideshow.js"></script>

Firefox doesn't load the javascript either. I have css code below this in the html file that is styling the rest of the page but it will not load the slideshow.css

Thanks for any help

Sep 20th, 2009, 08:58 PM
I don't see anything immediately weird about it. Do you have a link to the page in question?

Sep 20th, 2009, 09:04 PM
No it's not online. Just on my computer. I suppose I can put it up on some free hosting.

Sep 20th, 2009, 09:06 PM
Then do so. (:

Sep 20th, 2009, 09:45 PM
I've uploaded it here http://jdhost.ueuo.com/base.html Sorry for the messy code. I'm new to this :o It renders all messed up in IE but at least it loads the .css and .js files for the slider thing.

As a side note, I know I can fix the rendering problems in IE using conditional comments but is that bad practise?

Thanks :)

Sep 20th, 2009, 10:17 PM
The CSS loads for me in Firefox 3.5.3 though when I try and view the stylesheet directly in the browser, it isn't in plain text, same with your JS. You didn't use one of those silly "encrypt your source" things did you?

Sep 20th, 2009, 11:03 PM
The CSS styling the text at the bottom was working for you? Or do you mean the CSS styling the rest of the page? I'm not encrypting the files. I figured out the problem though, I was saving the .css and .js as ANSI text files. Saving them as unicode files fixed the problem. :confused: :)

Sep 21st, 2009, 12:34 AM
Ah, that makes sense. In Firebug, the source code for it was all mangled. Your server was probably sending the wrong encoding information.

Sep 21st, 2009, 08:17 AM
It looks like a Firefox setting problem in view-page style. :)