Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

css
border
communitycreator

What is the CSS border-left 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.

The border-left property in CSS is used to define the properties of the bottom left, such as style, color, and width, all in just one line.

border-left is a shorthand property of the following:

  • border-left-width
  • border-left-style
  • border-left-color

border-left-style is compulsory to define.

Syntax

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

Property values

  • border-left-width: Specifies the width of the border. The default value is Medium.

  • border-left-style: Sets the style of the border. The default value is NULL.

  • border-left-color: Sets the color of the border.

  • initial: Sets the value to its default value.

  • inherit: Inherits property from its parent value.

Code

In this example, we set the left border, and the color is set to violet. If we want to change the left border color, we select the color of our choice.

RELATED TAGS

css
border
communitycreator

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