Home Course Use CSS Border Shorthand property

Use CSS Border Shorthand property

by MH RISHAD - 25 Dec 2020


The Border property is a shorthand property for setting the following individual borderproperties:

  • border-width
  • border-style (required)
  • border-color

The diagram property is indicated as one, two, or three values from the list over. The arrange of the values does not matter.

The taking after illustration appears a few traces indicated with the shorthand border property:

·         A dashed border.

·         A dotted red border.

·         A 5px solid yellow border.

·         A thick ridge pink border.


.ex1 {border: dashed;}
.ex2 {border: dotted red;}

.ex3 {border: 5px solid yellow;}

.ex4 {border: thick ridge pink;}




27th Dec 2020 @ 10:39 AM

Jhon Reddy


Leave a Comment

Required fields are marked *