top
Expand Minimize
This topic has not yet been rated - Rate this topic

border-top

Sets the properties of the top border of the object.

Syntax

{ border-top: sBorder }

Possible values

sBorder

String that specifies or receives one or more of the following space-delimited values:

color

Any of the range of color values available to the border-top-color property.

style

Any of the range of style values available to the border-top-style property.

width

Any of the range of width values available to the border-top-width property.

The property has a default value of medium none. It is not inherited.

Remarks

The border-top property is a composite property that sets the width, style, and color values for the indicated border of an object.

All individual border properties not set by the composite border-top property are set to their default values. For example, the default value for width is medium.

If no color is specified, the text color is used.

Examples

The following example uses the border-top property to specify the composite properties. This example uses a call to an embedded (global) style sheet to change the attributes of the top border when an onmouseover event occurs:

<head>
<style>
    td { border-top: 1px lime dotted; }
    .change { border-top: 1px red solid; }
</style>

</head>
<body>
<table> 
<tr> 
    <td onmouseover="this.className='change'" 
        onmouseout="this.className=''">
        <img src="sphere.jpg"></td> 
</tr>
</table>

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Ee371298.xtlink_newWindow(en-us,Expression.40).png.

Applies to

a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, frameset, frame, hn, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.