This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > August 2006 > Firefox CSS Weirdness





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Firefox CSS Weirdness
fang

2006-08-02, 11:39 am



I have a page here:

Where, in Firefox, at least for me, seems to be ignoring my CSS file.
Anyone else see it that way?

If you do, look at the link that says "View 2000+ Data Set" in the top
text. That page makes the same reference, but Firefox does not ignore
the CSS file!

????!!!

help!

Thanks,

-Mike

K A Nuttall

2006-08-02, 11:39 am

fang wrote:

> I have a page here:


where?


--
K A Nuttall
www.yammer.co.uk
Re-type the e-mail address how it sounds, remove .invalid
fang

2006-08-02, 11:39 am


K A Nuttall wrote:
> fang wrote:
>
>
> where?
>



Dang. Sorry about that:

http://www.udel.edu/Geography/calm/data/data-links.html

Thanks,

-Mike

Beauregard T. Shagnasty

2006-08-02, 11:39 am

fang wrote:

> http://www.udel.edu/Geography/calm/data/data-links.html


Start here:
<http://validator.w3.org/check?verbo...data-links.html>

and here:
<http://jigsaw.w3.org/css-validator/...data-links.html>
"No style sheet found"

--
-bts
-Warning: I brake for lawn deer
Jim Moe

2006-08-02, 11:39 am

fang wrote:
>
> I have a page here: [mystery URL]
> Where, in Firefox, at least for me, seems to be ignoring my CSS file.
> Anyone else see it that way?
>
> If you do, look at the link that says "View 2000+ Data Set" in the top
> text. That page makes the same reference, but Firefox does not ignore
> the CSS file!
>

Both pages are severely lacking in proper HTML coding. No DTD, no
charset, loads of validation errors.
The only real difference I can see (without a lot of work) is that the
older page uses an undefined character set (charset). The newer one is
also undefined but is a different character set. Neither are UTF-8.
I suspect FF is not having a fun time deciding on which charset to use
and is guessing incorrectly.
You should have line in the <head> something like this:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
although in your case "iso-8859-1" is incorrect. Try "utf-16".

What editor do you use to edit the code?

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
fang

2006-08-02, 11:39 am


Jim Moe wrote:
> fang wrote:
> Both pages are severely lacking in proper HTML coding. No DTD, no
> charset, loads of validation errors.
> The only real difference I can see (without a lot of work) is that the
> older page uses an undefined character set (charset). The newer one is
> also undefined but is a different character set. Neither are UTF-8.
> I suspect FF is not having a fun time deciding on which charset to use
> and is guessing incorrectly.
> You should have line in the <head> something like this:
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> although in your case "iso-8859-1" is incorrect. Try "utf-16".


Those were missing, and I cleaned up some of the code, so now I am down
to 17 errors - none of which I understand.

http://www.udel.edu/Geography/calm/data/data-links.html

One error that really confuses me is:

Line 17 column 86: end tag for element "A" which is not open

Since I open and close links, which seems to be what it is referring
to, I have no idea why this would be an issue. :\

Other than that, the real issue is that Firefox is reading the CSS file
in other pages (like the one that links to the data from 2000+, but not
on this page. The link to the CSS file is fine, and works throughout
the rest of the site. Any ideas on that?

> What editor do you use to edit the code?


hand coded.


Thanks,

-Mike

William Tasso

2006-08-02, 11:39 am

Fleeing from the madness of the http://groups.google.com jungle
fang <fang27@excite.com> stumbled into news:alt.www.webmaster
and said:

> ...
> I cleaned up some of the code, so now I am down
> to 17 errors - none of which I understand.
>
> http://www.udel.edu/Geography/calm/data/data-links.html
>
> One error that really confuses me is:
>
> Line 17 column 86: end tag for element "A" which is not open
>
> Since I open and close links, which seems to be what it is referring
> to, I have no idea why this would be an issue. :\


Did you follow the suggested links to:
http://www.htmlhelp.com/tools/valid...ems.html#script

--
William Tasso

http://williamtasso.com/words/what-is-usenet.asp
Toby Inkster

2006-08-02, 11:39 am

fang wrote:

> http://www.udel.edu/Geography/calm/data/data-links.html
>
> One error that really confuses me is:
> Line 17 column 86: end tag for element "A" which is not open


It's caused by your drop-down menu Javascript. <script>...</script> blocks
aren't allowed to contain "</".

Solution #1 would be to take your Javascript and put it into an external
file, and then link to it like this:

<script src="myscript.js" type="text/javascript"></script>

Solution #2 would be instead to replace all instances of "</" in your
Javascript code with "<\/".

Either of those solutions will fix your first 14 errors!

For error #15, replace '<HR COLOR="#043FBF"' with:

'<HR style="color:#043FBF;background:#043FBF"'

Though you'd do better to move this styling into the CSS file.

For errors #16 and #17, note your file ends with:

</html>
</body>

which should really be:

</body>
</html>

All done! :-)

Also "-//W3C//DTD HTML 4.01 Frameset//EN" is an odd DOCTYPE to choose
for a page that isn't a Frameset. Try "Transitional"; aspire to "Strict".

Lastly, why have you used UTF-16? UTF-8 would probably cut the size of
your file in half.

> Other than that, the real issue is that Firefox is reading the CSS file
> in other pages (like the one that links to the data from 2000+, but not
> on this page.


Mozilla DOM inspector shows the <link> tag has been parsed correctly and
put into the DOM tree as expected; but the file at the other end contains
0 rules. Though looking at the file directly, everything looks fine, and
the file contains a few rules; so I assume Mozilla's just not parsing the
file correctly. It might be caused by the UTF-16-ness of the page --
perhaps it's also expecting the CSS file to be UTF-16?

Fix the errors listed above; and try converting the page to UTF-8 --
you'll need to save it as "UTF-8" in your text editor, and also change
this line in the source:

<meta http-equiv="Content-Type" content="text/html; charset=utf-16">

I reckon that will fix it.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

fang

2006-08-02, 11:39 am


I should mention up top that changing the doc UTF (saving it as that)
changed everything - including an issue where it wasn't having the SSI
references included and causing a big headache.

Thank you very much Toby for that and everything else!

Toby Inkster wrote:
> fang wrote:
>
>
> It's caused by your drop-down menu Javascript. <script>...</script> blocks
> aren't allowed to contain "</".
>
> Solution #1 would be to take your Javascript and put it into an external
> file, and then link to it like this:
>
> <script src="myscript.js" type="text/javascript"></script>
>


Yes, this actually was part of an issue I was trying to figure out
where SSI didn't seem to be working on the page.

>
> For error #15, replace '<HR COLOR="#043FBF"' with:
>
> '<HR style="color:#043FBF;background:#043FBF"'
>
> Though you'd do better to move this styling into the CSS file.



Yeah, I was planning to as soon as I could get the CSS recognized to
begin with. :-p


> Also "-//W3C//DTD HTML 4.01 Frameset//EN" is an odd DOCTYPE to choose
> for a page that isn't a Frameset. Try "Transitional"; aspire to "Strict".
>
> Lastly, why have you used UTF-16? UTF-8 would probably cut the size of
> your file in half.


Previous suggestion. I had utf-8 was what I should do, but.... :)

Actually, the only issue now has to do with the javascript and
drop-downs. Validation doesn't seem to work.

And I'm not real worried about that at the moment - I am going to try
and replace all of the javascript drop-down stuff with better written
CSS stuff.

Thanks to help you made suggestions and sent links!

-Mike

Dan

2006-08-02, 11:39 am

Toby Inkster wrote:
> Fix the errors listed above; and try converting the page to UTF-8 --
> you'll need to save it as "UTF-8" in your text editor, and also change
> this line in the source:
>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-16">


You're better off getting the server to send a proper content-type
header, and dispensing with the meta tags that are an inferior
substitute for this.

--
Dan

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews