O'Reilly logo

Cascading Style Sheets (CSS) by Example by Steve Callihan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting Borders

In CSS, you can easily set borders for block elements, including controlling their style, width, and color. You can control the appearance of the border around an element, as well as each individual border (top, right, bottom, and left).

Setting the Border Style

In CSS, the border-style property enables you to set various different border styles, using any of these values: none, hidden, solid, double, dotted, dashed, groove, ridge, inset, and outset. The default border style setting is none, which means that no border is initially displayed. All of these border styles were included in CSS1, except for hidden, which was included in CSS2. The none and hidden values operate the same, except when used with tables.

For instance, here ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required