Forum Moderators: not2easy

Message Too Old, No Replies

Mac, Netscape 4.72 & Disappearing CSS

css mac netscape bug disappearing styles font-family

         

gareth53

1:18 pm on Sep 8, 2004 (gmt 0)

10+ Year Member



Hello All,

here's the scenario:

I load my page in Netscape 4.72 on a Mac.
As the page is loading I can see the CSS styles appearing ok.

BUt as soon as the page finishes loading there's a quick flash and it's like the CSS 'gets lost' all the fonts revert to the default Times New Roman.

both my HTML and CSS files validate ok using the w3c validator.

Has anybody seen this problem before? And have a workaround?

ta!

mincklerstraat

1:20 pm on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to webmasterworld.
How's your stylesheet linked? You know, the stuff between the <head> tags?

encyclo

1:29 pm on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], gareth53.

Netscape 4.72 was pretty buggy. 4.79 or 4.8 are better in this respect - not better in their CSS capabilities, mind, just in terms of program stability.

Adding to mincklerstraat's questions, which charset are you using? UTF-8? And are you using any declarations in your CSS which are not supported by NN4?

gareth53

1:52 pm on Sep 8, 2004 (gmt 0)

10+ Year Member



i've tried linking to an external .css using the <link> tag, and ii've tried having the csss inside the head. Same result :(

i'm using charset: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

i'm also using relative font-sizes (% values)

I'm also using some padding and margins which i'm aware *could* cause problems, but there's no difference if i just strip that stuff out anyways.

If you have a Mac with Netscape to hand there's an example here:

<No URLs, thanks. See TOS [WebmasterWorld.com] and CSS Forum Charter [WebmasterWorld.com]>

both my HTML and CSS are return valid by w3c validators.

[edited by: DrDoc at 3:24 pm (utc) on Sep. 8, 2004]

encyclo

2:47 pm on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might want to review the terms of service [webmasterworld.com] about personal URLs.

There are a couple of things here: using UTF-8 in Netscape 4 is theoretically acceptable, but in practice sometimes troublesome. Have you tried switching to ISO-8859-1? In particular, UTF-8 tends to give huge font sizes by default in NN4.

Secondly, relative font sizes are dodgy in Netscape 4 anyway - you might want to consider using pixel font sizes in a simple stylesheet for NN4, then overriding them with the relative sizes in an @import stylesheet for the newer browsers which can handle them better.

Finally, applying padding and margin to

td
elements is risky in NN4 - better to place a
div
in the
td
with the padding applied to that.

gareth53

3:55 pm on Sep 8, 2004 (gmt 0)

10+ Year Member



uh, apologies for the URLs - self-promotion wasn't my intention (can i edit my posts BTW and remove said URLs?).

and thanks for the good ideas. I've changed the content-type charset and now the page with the styles in the head of the doc works ok. Even with relative font styles.

which is annoying since I wanted to use javascript to load either a Netscape CSS file OR the default file.

I now have the styles for Netscape in the head of the doc, followed by a link to an external file using the import method. Browsers that support the import method might see the text jiggle a bit as the external stylesheet loads - but what the heck.

These browsers will also be loading two sets of styles, when they only really need one.

What a mess! For my personal stuff I refuse to support Netscape 4 - you end up cobbling together all sorts of HTML and using all sorts of hacks.

Thanks for all your help anyhow.

Robin_reala

5:54 pm on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Out of interest, what sort of percentages of visitors are you getting using MacNN4?

encyclo

6:29 pm on Sep 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



These browsers will also be loading two sets of styles, when they only really need one.

You shouldn't ever need to duplicate styles - you can put the simple styles aimed at all browsers in one linked stylesheet, and the other styles for the advanced browsers in an imported stylesheet. Netscape 4 will only get the first one.

If you need to add something for NN4 only, you can specify it in the "simple" stylesheet, then override it in the imported stylesheet by making the second rule

!important
or with a greater specificity.

Out of interest, what sort of percentages of visitors are you getting using MacNN4?

I don't want to answer for the original poster, but sometimes the brief for the job specifies NN4 compatibility regardless of the actual percentage of users. NN4 Mac is basically the same as the Windows or Unix versions, so if you test in one, you're normally OK for the same version number on the other platforms.

gareth53

1:33 pm on Sep 10, 2004 (gmt 0)

10+ Year Member




via the stats I have access to, next to nobody is using Netscape on a Mac, but the above response assummed correctly - it was a stated requirement in a brief.

In response to the duplicated styles question - the Netscape Mac wasn't picking up styles in an external stylesheet when I dynamically wrote the include with javascript.

Luckily this site is a fairly basic, simple site so there's only a handful of definitions to handle/download...