The Problem
The rendering of the original frame syntax introduced in Netscape 2.0 produces
a border between adjoining frames of static thickness and appearance. The 3.0
versions of both Internet Explorer and Netscape sought to extend the original
syntax to allow control over these frame border appearance properties. One
problem existed with this - the syntax each browser chose is slightly different
from the other. Despite this incompatibility, it is possible to control these
properties so that the desired result can be achieved in BOTH browsers.
The New Syntax
- The following attributes are used for the FRAMESET tag to control the border
characteristics of all frames in the set. The FRAMEBORDER attribute is also
usable with the FRAME tag as well, where it controls the border around each
particular frame.
- FRAMEBORDER - Common Attribute
- This is a boolean (on/off) value controlling the display of the
border between frames. Netscape understands values of 'off'/'on'
and '0'/'1'. Internet Explorer only understands '0'/'1'. Default value
in both browsers is to display a border ('on' or '1'.)
NOTE: If FRAMEBORDER is set to '0' in
Internet Explorer or Netscape and a positive FRAMESPACING or BORDER
is also set, a gap will be rendered in place of the typical
beveled-edge frame border.
- BORDER - Netscape Attribute
- This specifies an integer pixel value representing the thickness of the
space between frames.
NOTE: If BORDER=0 is used in Netscape,
it implicitly sets (overrides) FRAMEBORDER to 'no'/'0'.
- FRAMESPACING - Internet Explorer Attribute
- This also specifies an integer pixel value for the thickness of the
space between frames.
Cross-compatibility Tips
- Use '0' and '1' as the value for FRAMEBORDER (not 'no' and 'yes')
- Use BOTH the BORDER and FRAMESPACING attributes
(with the same value) to control the frame border thickness.
- Explicitly set the FRAMEBORDER attribute (as well as the BORDER and
FRAMESPACING attributes) to '0' if no border is desired.
Examples
- Example - 5 pixel border between frames
- <frameset COLS="50%,50%"
FRAMEBORDER=1 BORDER=5
FRAMESPACING=5>
<frame NAME=frame1
SRC="test.htm">
<frame NAME=frame2
SRC="test.htm">
</frameset>
- Example - No borders between frames (borderless - 0 pixels)
- <frameset COLS="50%,50%"
FRAMEBORDER=0 BORDER=0
FRAMESPACING=0>
<frame NAME=frame1
SRC="test.htm">
<frame NAME=frame2
SRC="test.htm">
</frameset>
|