This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
From the examples on the previous pages, you have seen that it is possible to specify a different border for each side. In CSS, there are also properties for specifying each of the borders (top, right, bottom, and left):
p { border-top-style: dotted; border-right-style: solid; border-bottom-style: dotted; border-left-style: solid; }
Different Border Styles.
The example above gives the same result as this:
p { border-style: dotted solid; }
Here is how it works:
If the
property has four values:If the
property has three values:If the border-style property has two values:
If the
property has one value:/* Four values */ p { border-style: dotted solid double dashed; } /* Three values */ p { border-style: dotted solid double; } /* Two values */ p { border-style: dotted solid; } /* One value */ p { border-style: dotted; }
The
property is used in the example above. However, it also works with and .