[thelist] css is not loaded with page in Firefox

Timothy Joko-Veltman tim at indigopixel.com
Sat Nov 20 05:58:56 CST 2004


On Fri, 2004-11-19 at 19:00 +0100, Peter-Paul Koch wrote:
> > I'm have a bit of a problem where a page loads in Firefox 1.0 but the CSS
> > does not. The page appears as being unformatted.
> 
> I've had this problem a few times, and the cause was always the
> encoding of either the HTML page or the CSS (can't remember which
> one). However, in my case Mozilla never ever showed the styles, while
> in your case it seems to show them intermittently.
> 
> According to Textpad the "Encoding"  of the faulty files was
> "Unicode", and re-saving all files and making sure that 'Encoding" was
> "ANSI" solved the problem in my case.

I don't know why it would work, but the encoding was probably not the
real problem: I use UTF-8 (Unicode) exclusively, and have never had a
problem.

I have however, made the mistake of doing the following:

<link rel="stylesheet" type="text/css" src="mystyles.css" />

Instead of the correct

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

The former will render the page with no external styles - which if you
use them exclusively, will result in an unformatted page.  Another
plausible explanation might be that you have an error near the beginning
of your stylesheet (like a missing } on the first rule ), which would
mean that all the rules get ignored.  Using a validator
(http://jigsaw.w3.org/css-validator/) can help you find this quickly.

> 
> I can't explain what this Encoding stuff means, because I don't
> understand it myself. The solution above worked for me, though.
> 
> 
> -- 
> -------------------------------------------------------------------
> ppk, freelance web developer
> Interactie, copywriting, JavaScript, integratie
> http://www.quirksmode.org/ 
> ------------------------------------------------------------------
-- 
"The resonable man adapts himself to the world; the unresonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man."    --George Bernard Shaw



More information about the thelist mailing list