3.20 Border Properties

Now onto the next category of CSS properties—border properties. As expected, the border properties allow you to specify the appearance of borders that surround elements. We won’t bother to cover all the border properties, just the more important ones. Specifically, we’ll describe the border-style, border-width, and border-color properties. Then we’ll finish with the border shorthand property.

border-style Property

The border-style property specifies the type of border that surrounds the matched element. Here are the valid values for the border-style property:

Here’s an example class selector rule that uses the

Get Web Programming with HTML5, CSS, and JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.