Borders
9.8
Lesson

Border Sides

We can set different styles, widths and colours for the borders of the different sides of an element. We do this by specifying multiple values for the same property, like border-width: 3px 3px 4px 5px.

However, there are individual properties such as border-top-style, border-right-width, border-bottom-color among others, for styling borders for the specific sides:

For #second, we only specified the border-style for the top and bottom sides. And the border-color values have an effect only when border-style is specified. This is why, in the #second div, the border-color is only visible for the top and bottom sides.