Re: framesets in netscape
by "Kehvan M. Zydhek" <kehvan(at)zydhek.net>
||Mon, 8 May 2000 16:10:14 -0700
||"anna lena olausson" <alola(at)bahnhof.se>,
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:
Kehvan M. Zydhek
----- Original Message -----
From: "anna lena olausson" <alola(at)bahnhof.se>
To: "hwg" <hwg-techniques(at)mail.hwg.org>
Sent: Monday, May 08, 2000 3:03 AM
Subject: framesets in netscape
> hello everybody!
> i am working on a new site, and have decided
> to use a frameset-layout. the (horizontal)
> top of the window will be a frame with a
> menubar. i have made textbuttons to fit
> exactly in this (26 pixs high). now, netscape
> just decides to cut off some two pixels in
> the lower part of the frame! this might seem
> to be no problem, but when you have text in
> such a small area, it is most obvious that it
> is 'wrong' balanced. i have done framesets
> before, but have never noticed this problem.
> maybe the layout have been not so sensitive
> then, or does it only happen in frameset
> rows, or whatever.
> in the final version, but the cutting occurs
> from ordinary html-framesets as well. ie
> shows the frames correct, though.
> just to enlarge the mystery: i made an image
> 10x10 pix big, with a 5x5 squares pattern in
> two colors to use as background (easy to see
> the cropping). then i gradually increased the
> frame size by one pixel at a time, and the
> size grew bigger not every time i changed the
> code, but in steps. there was no visual
> difference between a 30 pixel high frame and
> one being 31. when i increased the value to
> 33 though, the frame was higher. i never
> managed to get the square pattern to tile up
> evenly though (to get the wanted 30 pix high
> frame), so it seems net is not only cropping
> pixels, it adds on also!
> here's the code:
> <FRAMESET FRAMEBORDER="0" FRAMESPACING="0"
> ROWS="30,*" BORDER="0">
> <FRAME MARGINWIDTH="0" MARGINHEIGHT="0"
> SRC="testList3.html" NAME="list"
> <FRAME MARGINWIDTH="0" MARGINHEIGHT="0"
> SRC="testScen.html" NAME="scen">
> if anyone knows anything about this, have had
> the same experience, knows of a workaround...
> i am most interested!
> /anna lena olausson
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA