border-top
CSS Attributes Reference

border-top

Description

Describes the top border. Values that are not present are set to their initial values. Supported on block and replaced elements only.

Syntax

{ border-top: border-top-width || border-top-style || border-top-color}

Remarks

This attribute is not inherited.

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

borderTop

See Also

border-bottom, border-left, border-right


border-top-color

Description

Sets the color of an element's top border. Supported on block and replaced elements only. See Color Table for a list of supported color values.

Syntax

{ border-top-color: border-color}

Remarks

This attribute is not inherited.

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

borderTopColor

See Also

border-bottom-color, border-left-color, border-right-color, border-color


border-top-style

Description

Sets the style of an element's top border. Dotted and dashed are treated as solid. Supported on block and replaced elements only.

The border styles are defined as follows:
none No border is drawn (regardless of any border-width).
solid Border is a solid line.
double Border is a double line drawn on top of the background of the element. The sum of the two single lines and the space between equals the border-width value. Border width must be at least 3 pixels wide to draw a double border.
groove 3-D groove is drawn in colors based on the value.
ridge 3-D ridge is drawn in colors based on the value.
inset 3-D inset is drawn in colors based on the value.
outset 3-D outset is drawn in colors based on the value.

Syntax

{ border-top-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset }

Remarks

This attribute is not inherited.

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

borderTopStyle

See Also

border-bottom-style, border-left-style, border-right-style, border-style


border-top-width

Description

Sets the width of an element's top border. Supported on block and replaced elements only.

Syntax

{ border-top-width: thin | medium | thick | length}

Remarks

This attribute is not inherited.

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

borderTopWidth

See Also

border-bottom-width, border-left-width, border-right-width, border-width


border-width

Description

Sets the width of the four borders at the same place in the style sheet.

"{1,4}" indicates that up to four different widths can be specified. If one width is supplied, it is used for all four sides. If two widths are supplied, the first is used for the top and bottom, and the second is used for left and right. If three widths are supplied, they are used for top, right and left, and bottom, respectively. Supported on block and replaced elements only.

Syntax

{ border-width: [thin | medium | thick | length]{1,4}}

Remarks

This attribute is not inherited.

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

borderWidth

See Also

border-color, border-style, border


clear

Description

Specifies if elements allow floating elements (normally images) to the left or right. More specifically, the value of this property lists the sides where floating elements are not accepted. With clear set to left, an element will be moved below any floating element on the left side. With clear set to none, floating elements are allowed on all sides.

Example

H1 { clear: left }

Syntax

{ clear: none | left | right | both}

Remarks

This attribute is not inherited.

Applies To

A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, HR, I, IFRAME, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text, INPUT type=checkbox, INPUT type=radio, INPUT type=image

Scripting Property

clear


clip

Description

Defines a clipping region shape and size for a positioned element.

The clipping region defines the part of the element that is visible. Any part of the element that is outside the clipping region is transparent. Any coordinate can be replaced by the value auto, which causes the clipping rectangle to match the element's opposite side. The default value is to clip to expose the entire element. Note the order of the values: clip:rect(0,0,50,50) would render the element invisible, as it would set both the top and the right positions of the clipping region to 0. To achieve a 50-by-50 view port, the syntax should be clip:rect(0, 50, 50, 0).

Syntax

{ clip: shape | auto }

Syntax

shape:rect (top | right | bottom | left)

Remarks

<top>, <right>, <bottom>, and <left> specify either auto or a length value.

Remarks

This attribute is not inherited.

Applies To

DIV, TEXTAREA, SPAN, INPUT type=button, FIELDSET, IMG, MARQUEE, INPUT, TABLE

Scripting Property

clip


color

Description

Describes the text color of an element, that is, the foreground color. For more information on supported colors, see Color Table.

Syntax

{ color: color}

Remarks

This attribute is inherited.

Examples

The following examples are different ways to specify red.

EM { color: red }              /* natural language / CNS */
EM { color: #F00 }             /* #RGB */
EM { color: #FF0000 }          /* #RRGGBB */
EM { color: rgb 1.0 0.0 0.0 }  /* float range: 0.0 - 1.0 */

Applies To

A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HTML, I, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text

Scripting Property

color


cursor

Description

Specifies the type of cursor to be displayed for the mouse pointer.

The following types are defined:

auto
Browser determines the cursor to display based on the current context.
crosshair
Simple cross hair.
default
Platform-dependent default cursor. Usually an arrow.
hand
Hand.
move
Something is to be moved.
*-resize
Edge is to be moved.
text
Editable text. Usually an I-bar.
wait
Cursor to indicate that the program is busy and the user should wait. Usually a watch or hourglass.

Syntax

{ cursor: auto | crosshair | default | hand | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help}

Remarks

This attribute is inherited.

Applies To

A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HR, HTML, I, IFRAME, IMG, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text, INPUT type=checkbox, INPUT type=radio, INPUT type=image

Scripting Property

cursor


display

Description

Indicates whether an element is rendered. If set to none, the element is not rendered. If set to one of the other values, the element is rendered. The default is to render the element.

Note Values for block, inline and list-item are not supported explicitly, but are useful in setting the display property to be on. In contrast to the visibility attribute, display:none reserves no space for the element on the screen.

Syntax

{ display: none | block | inline | list-item}

Remarks

For values other than none, the element will display with its normal display type.

This attribute is not inherited.

Applies To

TABLE, INPUT, TEXTAREA, INPUT type=button, DIV, SPAN, IFRAME, IMG, BODY, MARQUEE, SELECT

Scripting Property

display


filter

Description

Specifies one or more filters applied to an element.

Internet Explorer supports the following built-in filter types: Visual Filter, Reveal Transition Filter, or Blend Transition Filter. For detailed information, see Creating Multimedia Effects with Visual Filters and Transitions. The filter mechanism is extensible and allows additional filters to be developed and added later.

Syntax

{ filter: filtertype1(parameter1, parameter2,...) [filtertype2([parameter1, parameter2)]...}

Remarks

An asterisk in the following applies to list indicates that a defined height, width, or absolute position is required.

Remarks

This attribute is not inherited.

Applies To

BODY, BUTTON, DIV*, IMG, INPUT, MARQUEE, SPAN*, TABLE, TD, TEXTAREA, TFOOT, TH, THEAD, TR


float

Description

Specifies whether the object floats, causing text to flow around it.

With the value none, the element will be displayed where it appears in the text. With a value of left (right), the margin properties will decide the horizontal positioning of the image and the text will flow on the right (left) side of the image. With a value of left or right, the element is treated as block-level (that is, the display property is ignored).

Syntax

{ float: left | right | none}

Remarks

This attribute is not inherited.

Example

The following example demonstrates the float attribute.

<html>
<head>
<title>case for float</title>
</head>
<body>
<p>This is an example of float. "image1" should float to the left and "image2" should float to the right.
<img src=" http://www.microsoft.com/image1.gif" style="float:left">
<img src="http://www.microsoft.com/image2.gif" style="float:right">
<p>
</body>
</html>

Applies To

TABLE, INPUT, TEXTAREA, INPUT type=button, DIV, SPAN, OBJECT, APPLET, EMBED, IFRAMES, MARQUEE, SELECT

Scripting Property

styleFloat


font

Description

Defines the separate font attributes (font-style, font-variant, font-weight, font-size, line-height, and font-family). This property is a composite property. Values that are not present are set to their initial values. Font-size and font-family are required.

Syntax

{ font: [ font-style || font-variant || font-weight ] font-size [ line-height ] font-family}

Remarks

This attribute is inherited.

Applies To

A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HTML, I, INPUT, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text

Scripting Property

font

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.