1. Computing & Technology

Discuss in my forum

border-style

By , About.com Guide

border-style Description:

The border-style property defines the styles of the borders of the element.

border-style in CSS Versions:

border-style Syntax:

border-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset | hidden | inherit

  • none
    No border displayed.
  • dotted
    A dotted line drawn above the background.
  • dashed
    A dashed line drawn above the background.
  • solid
    A solid line.
  • double
    A double line drawn above the background. The sum of the two single lines and the space between is the value of the border-width.
  • inherit
    The element should have the same border-style setting as the parent.
  • groove
    A 3-D groove drawn in colors based on the color property.
  • ridge
    A 3-D ridge drawn in colors based on the color property.
  • inset
    A 3-D inset drawn in colors based on the color property in separated borders model (CSS 2). Same as ridge in collapsing borders model.
  • outset
    A 3-D outset drawn in colors based on the color property in separated borders model (CSS 2). Same as groove in collapsing borders model.
  • hidden
    Same as none, but in the collapsing border model inhibits any other border (CSS 2).

border-style Initial Value:

none.

border-style Applies To

All elements.

border-style Inheritance:

This property is not inherited.

border-style Browser Support:

border-style Examples:

standard border-style

<p style="border-style : solid;">
 This paragraph has a solid border.
 </p>

border-style Special Notes:

  • CSS1 allows user-agents to display all values other than "solid" as "solid".

More border-style Information

Return to the Style Library

©2012 About.com. All rights reserved.

A part of The New York Times Company.