Export (0) Print
Expand All
top
Expand Minimize

border-top-color

Sets the color of the top border of the object.

Syntax

{ border-top-color: sColor }

Possible values

sColor

Variant that specifies one of the default HTML color names or RGB values.

This property has no default value and is not inherited.

Remarks

Some browsers do not recognize color names, but all browsers should recognize RGB color values and display them correctly.

Examples

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

<head>
<style>
    td { border-top-color: red; border-width: 0.5cm; border-style: groove; }
    .blue { border-top-color: blue; }
</style>
</head>
<body>
<table border >
<tr>
    <td onmouseover="this.className='blue '" onmouseout="this.className=''">
        <img src="sphere.jpg">
    </td>
</tr>
</table>

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) Ee371286.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, frame, hn, hr, 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.

Community Additions

ADD
Show:
© 2014 Microsoft