Forum Moderators: not2easy

Message Too Old, No Replies

borders in netscape 4.x

Getting css borders to work in NN 4.x

         

MWpro

5:33 am on Mar 17, 2003 (gmt 0)

10+ Year Member



The borders I make work well in IE and Opera, but for some reason they never show up in Netscape 4.x. Here is the basic code below for the first problem.

(in external stylesheet)
.bormain {
border-left: 3px solid #333366;
border-right: 3px solid #333366;
}

(in document)
<table class="bormain" cellpadding="5" cellspacing="0" width="750">

And the second problem I have deals with borders on images, take a look at the code here.

.borimg {
border: 2px solid #333366;
}

<img src="pic.gif" class="borimg" width="140" height="140" space="2" hspace="2">

This works fine in IE and Opera, but in Netscape it doesn't put the border around the image at all; instead it puts a little tiny box to the right of it.

So what is the trick to getting borders to work in Netscape?

DrDoc

8:34 am on Mar 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Netscape 4 does not understand borders around images. No matter what you do, it will put a "little box" around what is that placeholder icon thingy while the image is loading. Your only option is to put a DIV around the image, and apply border to it instead.

Now, Netscape 4's understanding of borders is very limited. It understands only the following syntax:

border: 1px solid #000;

Forget about border-left etc. It's either a solid border around the whole thing, or nothing. Also, it understands nothing but "solid" borders. Even if you try something else, solid it will be.

MWpro

9:39 pm on Mar 17, 2003 (gmt 0)

10+ Year Member



Thank you for the information.

securecat

4:23 pm on Mar 20, 2003 (gmt 0)

10+ Year Member



Netscape 4.x can understand JSSS. However, it may be unable to apply to some elements.

Try as below:

[in HTML]
<link rel="stylesheet" type="text/javascript" href="nn4.jss">

[in "nn4.jss"]
with (document) {
with (classes.bormain.TABLE) {
borderColor = "#333366;
borderStyle = "solid";
borderWidths("0px","3px","0px","3px");
}
}

calimehtar

2:27 am on Mar 21, 2003 (gmt 0)

10+ Year Member



Hey, I spent 3 years or so trying to do css in Netscape 4, but it just isn't worth it. Market share is pretty low now, and the effort required and the limitations implied by supporting Netscape 4 are just outrageous. If you're doing design work for a client make sure they know upfront that supporting Netscape 4 means:

  • a clunky site that will with html that will be hard to read and hard to upgrade if you ever decide to drop netscape 4 support
  • about 30% more work at all levels that interact with the browser, and this is just for supporting Netscape 4.7+. More work is required for wider compatibility
  • all of this for a browser that's a maximum of 15% marketshare and closer to 2% in a lot of places.

Sorry for the rant, but I finally stopped supporting Netscape 4 this month -- I just hide the css from the browser -- and I am so so so happy.