Name
border — NN n/a IE 4 DOM n/a
Synopsis
Read/Write
A shorthand property for getting or setting the
borderColor, borderStyle,
and/or borderWidth properties of all four borders
around an element in one statement. You must specify a border style
(see borderStyle) for changes of this property to
affect the display of the element’s border. Numerous other
properties allow you to set the width, style, and color of individual
edges or groups of edges if you don’t want all four edges to be
the same. Only those component settings explicitly made in the
element’s tag attributes are reflected in the property, but you
may assign components not part of the original tag.
Example
document.all.announce.style.border = "inset red 4px"
Value
For the borderStyle and
borderWidth
component
values, see the respective properties in this chapter. For details on
the borderColor value, see the section about
colors at the beginning of this chapter.
Default
None.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access