Can I change the border thickness, type, or color individually?

Question

Can I change the border thickness, type, or color individually?

Answer

Definitely! With the border-width, border-style, and border-color longhand properties we can change the thickness, type, and color of the border individually.

We can change border thickness with the border-width property. For example:
border-width: 0.25rem; /*will set the border width on all sides to 0.25rem*/

We can change the border style (type) with the border-style property with values including solid, dotted, dashed, double, etc:
border-style: dotted; /*will set the border style to a dotted pattern*/

We can change the border color with the border-color property:
border-color: #FF5547; /*will set the border color to a red/orange color*/

2 Likes