Contents Index Topic Contents | ||
Previous Topic: background-repeat Next Topic: border-bottom |
border
Description
Specifies the border to display around the element. The border property is a shorthand (composite) property for setting border width, color, and style for all four sides of an object. If a border-color is not specified, the text color is used. Supported on block and replaced elements only.
All individual border properties not set by the composite border property will be set to their initial values. For example, the initial value for border-width is medium. Setting border: thin is identical to saying border: thin none; the initial 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 border-style or border-color that has been previously set.
Syntax
{ border: border-width || border-style || color}
Remarks
This attribute is not inherited.
Example
Creates a border for all four sides of the object, where all four sides show a 20 pixel blue border with an inset style. Use the individual properties to control the border for individual sides of the object.
{border: 20px inset blue}Applies To
BLOCKQUOTE, BODY, CENTER, DD, DIR, DIV, DL, DT, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HR, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, TABLE, TD, TH, TR, UL, XMP, CAPTION, TEXTAREA, IFRAME, SPAN, IMG, EMBED, OBJECT, INPUT
Scripting Property
See Also
border-width, border-style, border-color border-right, border-left, border-top, border-bottom
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.