Retro Coding: CSS and Netscape 4x

P

PeterMcC

Super. Thanks. I was worried there might be some conflicts because of
the Mozilla name, either when installing or when de-installing later
on.

PS: Just for the heck of it: can you still get a copy of Netscape 1,2,
or 3 anywhere? Or Mosaic 1 or 2?

Have a look in http://browsers.evolt.org/
 
S

Steve Pugh

Nicolai P. Zwar said:
Now here's the rub: the page has to function and look fairly
decent in Netscape 4x browsers, too.

Without seeing the designs you have to transform into HTML it's
difficult to give specific advice.

NN4 is quite capable of getting the CSS used for font formatting
correct so there's no need to resort to <font> tags. The one area
where NN4 screws up the font formatting is with (nested) tables - you
typically need to assign a class to every <td>.

NN4 tend to add margins to the defaults, so if you're setting <p>
elemsnts to have a smaller than normal margin in NN4 they will end up
with a larger one. Hide the margin CSS from NN4.

NN4 and borders is a long story. If you add borders and background
colour then NN4 will include a gap between the two. Unless you
absolutely position the element in which case you can use the NN4 only
layer-background-color property to fill the gap.

Setting borders on less than all four sides is tricky. I've had best
results by setting
border-style: solid; border-color: black; border-top-width: 2px;
border-left-width:0; border-right-width: 0; border-bottom-width: 0;
instead of the shorter border-top: 2px solid black; that we would use
in other browsers.

Background images are only partially supported and unless it's a
simple repeating background are best avoided (and let's not forget
that NN4 also screws up HTML background images on tables).

If you set a background colour then be sure to set a border (even if
it's border: none;) to make the colour fill the whole element and not
just the area behind the text.

Don't ever try to style form elements in NN4. Even if it doesn't make
the form unusable (I've seen <select> elements rendered as plain text)
then it's likely to draw random boxes on the screen.

Changing the nature of lists (i.e. to make a horizontal nav bar) or
even just changing the amount of indent a list has is also likely to
cause problems. If the design allows the nav to degrade to an ordinary
bulleted list just use a <ul> and hide the styles. Otherwise you'll
have to bite the bullet and use a table or a set of <br>s to make your
nav.

Floats sometimes work, test and see. Positioning works quite well so
long as it isn't too fancy but layouts where everything is absolutely
positioned are even more brittle for some users than tabled layouts.

If you do decide to use some tables for layout try to avoid nesting
tables and also think about whether one large table of several
sequential smaller ones would work better. I'd recommend using smaller
tables (and dropping tables for the parts of the page that don't need
multiple columns) to allow the browser to render the page quicker.

Steve
 
N

Nicolai P. Zwar

Steve Pugh wrote:

[good advice snipped]


Thank you very much for you very helpful reply, Steve; I appreciate your
advice and have saved your post for reference to keep the things you
mentioned in mind.
 
M

Mark Parnell

I am about to start on a quite large (and ever growing) site (with two
implemented databases), lots of pages, (maybe) a discussion forum,

Now here's the rub: the page has to function and look fairly
decent in Netscape 4x browsers, too. Haven't coded with Netscape 4x in
mind for quite a while, but there are several options I can think of
right away:

One other alternative could be to look into JSSS[1], though whether it
is worth learning it just for one site (it's unlikely you will ever use
it again) is debatable.

[1] JavaScript Style Sheets. This was Netscape's proposal that was
rejected in favour of CSS. AFAIK only NS4 supports it.
 
J

Jeff Thies

To not worry about the design for NS4 and just deliver plain markup for
this browser is not an option; the site will have a largely
presentational nature and a plain old black and white doc look won't do.
(They wouldn't have hired me to do that anyway... they know their HTML).
I agree with you that before everything, an HTML doc should make sense
without stylesheets, but some pages will require special plug-ins,

NS4 should be fine with plugins.
there
will be password protected areas, a discussion forum (one that has to be
usable with NS4, too), so while I again agree with you that I shouldn't
worry about positioning everything _exactly_ on the screen, I cannot
risk to have things positioned completely at random. Keep in mind the
site will have a presentational nature.

My experience (I just stopped coding for NS4) is that it is margins on
containers that cause the worst failures on NS4.

Font and lineheight work OK, although tables do not seem to inherit body
styles (add th and td).

Padding seems to be OK.

Background-color is as bit bizarre, there's some hacks with
layer-background-color and setting borders. Oh, that's in a haze.


Jeff
 
N

Nicolai P. Zwar

Mark said:
One other alternative could be to look into JSSS[1], though whether it
is worth learning it just for one site (it's unlikely you will ever use
it again) is debatable.

[1] JavaScript Style Sheets. This was Netscape's proposal that was
rejected in favour of CSS. AFAIK only NS4 supports it.

Thanks for the hint, Mark. Maybe I won't have to "learn" the Netscape
JavaScript Style Sheet specifications; maybe I can check them out and
toggle the Netscape 4 design with it as I go along, "learning by doing".
The more I can keep the actual code of the webpage free of design
elements, the better as far as I'm concerned.
It is not essential that the "modern" and the "Netscape" site-look are
identical (or even nearly identical), so maybe I can find something in
these specs that'll make the site look good (and "corporate identity"
enough) on N4 independently.
 
M

Mark Parnell

Mark said:
[1] JavaScript Style Sheets. This was Netscape's proposal that was
rejected in favour of CSS. AFAIK only NS4 supports it.

Thanks for the hint, Mark.

I'd be interested to hear how you go with that - I haven't ever had the
need to look into JSSS myself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top