borderborder*
*



Contents  *



Index  *Topic Contents
*Previous Topic: bgProperties
*Next Topic: border

border

Description

Sets or retrieves the width, color, and style of a border to be drawn around the element.

Syntax

object.style.border[ = border]

Remarks

The border property is a shorthand (composite) property for setting border width, color, and style for all four sides of an object. If a borderColor is not specified, the text color is used.

All individual border properties not set by the composite border property will be set to their default values. For example, the default value for borderWidth is medium.

Setting border=thin is identical to saying border=thin none; the default value for color picks up the text color if one isn't initially set. So, in addition to setting the border width to thin, it will clear any borderStyle or borderColor that has been previously set.

For more information on supported colors, see Color Table.

Setting a border to zero or omitting the attribute causes no border to be displayed. Supplying the border attribute without a value defaults to a single border.

The property has read/write permission. It is supported on block and replaced elements only.

Applies To

HTML Tags BLOCKQUOTE, BODY, CAPTION, CENTER, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HR, IFRAME, IMG, INPUT, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, SPAN, TABLE, TD, TEXTAREA, TH, TR, UL, XMP
Scripting style

CSS Attribute

border


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.