Categories
Web development

CSS border-right-color Property

CSS border-right-color Property

The CSS border-right-color property settles the color of an element’s right border.

Syntax:

border-right-color: color|transparent;

color – defines the color of the right border.

transparent – the border color will be transparent.

Example:

<!DOCTYPE html>
<html>
<head>
<style>
h4 {
  border-right-style: solid;
  border-right-color: #2a9d8f;
}

p {
  border-style: solid;
  border-right-color: #2a9d8f;
}
</style>
</head>
<body>

<h4>A heading with a colored right border.</h4>
<p>A paragraph with a colored right border.</p>

</body>
</html>

Output:

A heading with a colored right border.

A paragraph with a colored right border.


Enjoy coding!

Read also:

CSS border Property

CSS border-left-color Property