CSS3 > Borders

Border-right-color Property in CSS3

How to set the color to the right border of an element in CSS3?


By using border-right-color property we can set the color to the right border of an element.

<style>
        p {
            border-style: solid;
            border-right-color: red;
        }

        div {
            border-style: double;
            border-right-color: blue;
        }
</style>

<body>
    <p>This element having red color border at the rightside.</p>
    <div>This element having blue color border at the rightside.</div>
</body>

In the above code snippet we have given border-right-color property with different values to the <p> element and <div> element. The border-right-color property with value "red" is applied to the <p> element, so that the right side border color of <p> element will appear in red color. The border-right-color property with value "blue" is applied to the <div> element, so that the right side border color of <div> element will appear in blue color.

OUTPUT

 

 Views: 3004 | Post Order: 63



Write for us






Hosting Recommendations