Re: Netscape 1 pixel border with frames

by "Kehvan M. Zydhek" <kehvan(at)zydhek.net>

 Date:  Mon, 22 Oct 2001 07:07:13 -0700
 To:  <hwg-graphics(at)hwg.org>
 References:  dfyh co freenet
  todo: View Thread, Original
I spent some time this morning looking for the website I once referenced on
one of these HWG lists regarding Netscape's frame problem. I should have
started at the beginning... I finally checked Google for "framesets
'Netscape 4'"... the eighth "hit" was my very own post from May 2000, quoted
below in its entirety. Apparently, though dated, it's still very relevant...

---------

http://archives.hwg.org/hwg-techniques/006101bfb942$998e8ea0$2d4a28d1@kmzydh
ek

Re: framesets in netscape
Mon, 8 May 2000 16:10:14 -0700

Anna,

I'm somewhat surprised someone has not mentioned this yet... Not too long
ago, and probably once a week or so since I joined the list, the question of
frames in Netscape comes up. It all boils down to this:

Netscape created the <frame> tag in the first place, but hasn't grown with
the real world in being able to size frames to pixel-specific sizes
(Netscape 6, however, fixes this problem, and brings it in-line with MSIE,
Opera, and the rest).

Netscape 4.x and older calculates frames based on a percentage of the
available browser window. If you want x pixels for a frame, it converts that
x into a percentage based on overall size available, then rounds it to the
nearest integer percentage, since fractional percentages are not allowed.
Any window other than one 100px wide by 100px high (or multiples of this,
such as 200px x 200px, etc) with frames set to pixel-specific sizes will
encounter this problem. I suspect that even this window might encounter this
problem, too, as there are margins and page-edge buffers that can be a pain
to turn off.

You can tweak you code over and over and come up with a pretty close
approximation of what you want, using browsersniffing to set frames to
x-pixels for Netscape, and y-pixels for everything else. This works pretty
good, until you resize the browser, that is. By changing your resolution,
platform, or just dragging the edges of the browser around a bit, Netscape
refreshes the page and recalculates the percentages, almost always screwing
up your hard work. It's quite annoying, and is one of the reasons I'm
phasing out frames from my designs, moving instead to CSS Positioning
tricks, which have their own plusses and minuses, or for more simpler
designs, using just tables to acheive the look, but not the flexibility, of
frames. If frames are a MUST for your design, my recommendation would be to
build frame-independent elements for each section, rather than frames that
require lining up perfectly with other frames to form a unified whole.

You can read additional information about this at:
http://www.builder.com/Authoring/Tagmania/120699/index.html

Good luck!
Kehvan M. Zydhek

---------

Additional information about framesets can be found at:
http://www.w3.org/TR/REC-html40/present/frames.html#edef-FRAME


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This email was scanned by NORTON ANTI-VIRUS 2002 prior to
:: sending, and is certified to be free of any embedded or attached
:: viruses, trojans, or internet worms.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


----- Original Message -----
From: "Claus Cyrny" <ccyrny(at)freenet.de>
To: <private(at)pws.co.nz>
Cc: <hwg-graphics(at)hwg.org>
Sent: Monday, October 22, 2001 04:30
Subject: Re: Netscape 1 pixel border with frames


> Hi,
>
> Heike Koester + Stefan Schulz wrote:
>
> > Dear fellow designers,
> >
> > I used frames on a design and everything is ok apart from a annoying 1
pixel
> > border that Netscape (4.x) puts between the framesets despite the
border=0
> > setting.
>
> I had the same problem a while ago with my own site and came to the
> conclusion that this is a bug in Netscape. Possible solution see below.
> My consequences are that I don't use framesets anymore.
>
> > In fact I have used all three settings
> > frameborder=0 framespacing=0 border=0 in every frameset and
> > scrolling="no" marginheight=0 marginwidth=0 noresize frameborder="no"
for every
> > frame (apart from one that has scrolling=auto)
>
> Actually, what you are using is *not* valid HTML 4.0.
>
> 1.) There is no attribute 'frameborder="no"'. In addition,
> you have used other invalid attributes in <frameset ...>
> like 'framespacing=0 border=0 frameborder=0>'
>
> Frameset definition in SGML:
>
> <![ %HTML.Frameset; [
>  <!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?)
> -- window subdivision-->
>  <!ATTLIST FRAMESET
>    %coreattrs;                          -- id, class, style, title --
>    rows        %MultiLengths; #IMPLIED  -- list of lengths,
>                                            default: 100% (1 row) --
>    cols        %MultiLengths; #IMPLIED  -- list of lengths,
>                                            default: 100% (1 col) --
>    onload      %Script;       #IMPLIED  -- all the frames have been
oaded  --
>    onunload    %Script;       #IMPLIED  -- all the frames have been
removed --
>    >
>  ]]>
>
> 2.) You should set *all* your attributes in quotation marks, either
> attribute='value', or attribute="value".
>
> 3.) You have no DOCTYPE definition, which makes it impossible
> for the validator at W3C (http://validator.w3.org/)  to validate this
document.
>
> 4.) As to my knowledge a frameset has no <head> and <body>
> section, and in addition you have not specified a <noframes> section
> properly.
>
> All in all I discovered that there is no workaround for this problem
> with *valid* HTML (sad, but true).
>
> Suggested solution: Make your frameset HTML 4.0-compliant,
> and then add an - invalid - 'border="0"' to the frameset definition.
>
> Then I saw that you are mixing style sheets and margin definitions in
> HTML. Maybe it would be better to do as much of the formatting as possible
> using style sheets.
>
> That's about all that comes to my mind right now.
>
> HTH,
>
> Claus
> --
> - Member of the HTML Writers Guild
> - Mitglied der tekom (http://www.tekom.de)
> - Mitglied des Kuenstlerhauses Stuttgart
> - http://www.grafik-tips.org
>
>
>
>

HWG: hwg-graphics mailing list archives, maintained by Webmasters @ IWA