Glubase - share your knowledge


All / Computers / Programming / CSS





  • View Command

CSS Reference

CSS border-color definition

Browser support
IEFFOpSaf

Type:

Syntax

border-color: <color>{1,4}

Description

The border-color property specifies the color of an element's border.

Values

Value Description

Transparent

Default value. Defines a transparent background color.

RGB color value

Example: rgb(0,255,0)

Hexadecimal color keyword

Example: #FF0000

CSS color keyword

Example: red

 See Also

border, border-style, border-width, border-collapse, border-spacing

Example

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

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

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

Output

Color 1
Color 2
  • Comments

No comments added.