Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

css
communitycreator
border-right

What is the CSS border-right property?

Behzad Ahmad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Overview

The border-right property in CSSCascade Style Sheets is used to define the color, style, and width of the right border.

It is a shorthand property of the following:

  • border-right-width
  • border-right-style
  • border-right-color

Note: It is mandatory to define border-right-style.

Syntax


border-right: border-width border-style border-color|initial|inherit;

Property values

  • border-right-width: This is used to specify the width of the border. Medium is the default value.

  • border-right-style: This has a default value of NULL. It is used to set the style of the border.

  • border-right-color: This is used to set the color of the border.

  • initial: This is used to set the value to its default value.

  • inherit: This is used to inherit property from its parent value.

Example

Explanation

We set the right border’s color to blue. If we want to change the right border’s color, we can do that as well.

RELATED TAGS

css
communitycreator
border-right

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring