Glubase - share your knowledge


All / Computers / Programming / CSS





  • View Command

CSS Reference

CSS border-top-color definition

Browser support
IEFFOpSaf

Type:

Syntax

border-top-color: <color>

Description

The border-top-color property defines the color of the top border.

Values

Value Description

Transparent

Default value. Makes the background color transparent.

RGB color value

Example: rgb(0,255,0)

Hexadecimal color keyword

Example: #FF0000

CSS color keyword

Example: red

 

Version information

Available in CSS2.

Example

[Try this example yourself]
<style type="text/css">
.color1
{
  border-style: solid;
  border-top-color: #FF0000
}
.color2

  border-style: solid;
  border-top-color: #0000FF
}
</style>

<div class="color1">
  Color 1
</div>
<div class="color2">
  Color 2
</div>

Output

Color 1
Color 2
  • Comments

No comments added.