This is my first post on this forum. I've been scouring the web for information regarding this, but I wasn't very successful.
What I have learnt so far is that Firefox is very strict when it comes to XHTML. I have some external CSS and JS files that I'm serving up. Initially I wasn't setting any headers in them. So I tried that, and they still don't render.
Basically, the site works fine without the XHTML DOCTYPE information. But I'm trying to get my site to be XHTML compliant and when I add the DOCTYPE information, it doesn't render properly in Firefox (Although IE seems to have no problem, but I understand that's because it's not as strict as FF).
Anyway, here is what I put at the beginning of the file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
Once I add this, FF stops rendering the CSS and also stops running the JS.
For my CSS files I have the following:
?><link rel = "stylesheet" type = "text/css" href = "<?php echo $CSSBASE ?>/styles_ff.css.php" /><?php
?><link rel = "stylesheet" type = "text/css" href = "<?php echo $CSSBASE ?>/styles_ie.css.php" /><?php
<link rel = "stylesheet" type = "text/css" href = "<?php echo $CSSBASE ?>/styles_common.css.php" />
[FONT=Courier New]$CSSBASE[/FONT] contains the absolute path (with the whole URI) to my CSS files.
For my JS files, I have:
<script src = "<?php echo $JSBASE ?>/general.js.php"
<script src = "<?php echo $JSBASE ?>/index.js.php"
[FONT=Courier New]$JSBASE[/FONT] is similar to [FONT=Courier New]$CSSBASE[/FONT].
Once I remove the DTD information, the page renders fine. But as soon as I insert the DTD information, Firefox chokes on it.
The page doesn't validate properly under explicit XHTML 1.1 settings at the W3 Validator page. But if I set the DTD, it removes most of the validation errors, except some "<a> not supposed to be here, missing <li>" errors. I figure I will get to that later - but could that be the reason that FF is choking on it? Improper XHTML?
Thanks in advance.