frameborder (HTML attribute)
Example
The border removed for both
frames:
<frameset rows="100,*" > <frame src="header.html" frameborder="0"/> <frame src="home.html" frameborder="0"/> </frameset>
Description
Depending on the design and
colors used on the pages contained within each frame in
the frameset, it may not be immediately obvious where
the boundaries are between the individual frames. In order to make it
absolutely clear, you can use the frameborder
attribute which will cause the browser to render a visual delineation
(most likely as a 3D or bevelled border, but it very much depends on the
style of the browser that you use). If the frame is
resizable (which it will be unless you use the
noresize attribute to instruct the browser
otherwise), the frameborder will provide the user
with something obvious that they can grab hold of to change the frame’s
size.
Value
The HTML specification says to use
"1" to signify ‘border on’ and "0"
for ‘border off’, but some browsers will also honor values of
"yes" and "no". If no value is
specified, no border is applied.
Compatibility
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Partial |
Every browser listed supports this attribute.
Note that to remove the border entirely, for
example removing the single border between two frames as shown above, you
must set the frameborder attribute to both
of the adjacent frames. If you only set it on one of the frames, depending
on the browser you view it in, it will either thin the frame down a bit or
do nothing at all.
Opera has been given a "partial" pass as it does
not entirely honor frameborder="0" even when set to both
frames - there is still a visible gray border (at least this is the case
on Mac OS X).
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

