CSS border & outline properties
Unlike the outline property, all four sides of a border can be of a different value for a style: dotted
, dashed
, solid
, double
, etc. To set an element's border or outline style, you should either use a shorthand border
or outline
property or specify the style using individual property — border-style
or outline-style
.
Make a note that the border-style property is a shorthand for the following properties:
• border-bottom-style
• border-left-style
• border-right-style
• border-top-style
You can specify a style for each side individually or list them all inside the border-style
property in a clockwise order starting from the top.
Pro Tip: None of the CSS properties applied to the border/outline will work if you forget to specify the style property.