CSS2 » Properties » border-top

Version: Level 1

Compability: IE4+  N6

Syntax:
border-top : border-top-width &| border-style &| border-color

The border-top property allows you to declare for the top border the border-top-width, and/or the border-style, and/or the color properties in only one declaration. The color value uses the same values as discussed in border-color. This property is not inherited.

Examples

Code:
body { border-top: thick dashed yellow; }
body { border-top: thick double green; }
body { border-top: dotted gray;
Language(s): CSS2
Code:
p.bordr
{
border-bottom: 25px solid red;
border-left: 25px solid yellow;
border-right: 25px solid blue;
border-top: 25px solid green;
}
...
<p class="bordr">
DevGuru is great!
</p>
Output:

DevGuru is great!

Language(s): CSS2

See Also: