Border properties

Purpose

Specifies the width, color, and style of the border area of a box and the spacing between adjacent table cell borders.

Controls

Control Description Options Property
Collapse Specifies one of two models for setting borders on table cells. A setting of 'separate' causes the Spacing properties to be used. collapse, separate theme_border_prop.html#border-collapse
Spacing Sets the vertical and horizontal distances and units that separate adjacent cell borders in tables. The value applies to all cells in the table. If the Collapse property is set to 'collapse', then the Spacing values will have no effect. <length>  theme_border_prop.html#border-spacing
Color Specifies the color of a border. You can choose All to synchronize the values for all borders, or control the four individual borders separately. transparent, <color> theme_border_prop.html#border-color or theme_border_prop.html#border-all-color
Style Sets the style of a border. You can choose All to synchronize the values for all borders, or control the four individual borders separately. dashed, dotted, double, groove, hidden, inset, none, outset, ridge, solid   theme_border_prop.html#border-style or theme_border_prop.html#border-all-style
Width Defines the width of a border. Either a text value or a number. Entering a number enables a drop-down where you can select the unit value. You can choose All to synchronize the values for all borders, or control the four individual borders separately. medium, thick, thin, <length>  theme_border_prop.html#border-width or theme_border_prop.html#border-all-width

Properties

border-collapse

Specifies one of two models for setting borders on table cells. A setting of 'separate' causes the border-spacing property to be used. The default value is 'separate'.

Option Description
collapse Specifies that borders should collapse into a single border.
separate Specifies that borders should be detached.
inherit The value of the property should be inherited from the parent element.
border-color

Specifies the color of all four borders of an element.

Option Description
transparent Makes the selected element transparent, i.e. the keyword is a shorthand for rgba(0,0,0,0).
<color> The border color represented by a color name or a hex code.
inherit The value of the property should be inherited from the parent element.
border-top-color, border-right-color, border-bottom-color, border-left-color

Specifies the color of the selected border of an element.

Option Description
transparent Makes the selected element transparent, i.e. the keyword is a shorthand for rgba(0,0,0,0).
<color> The border color represented by a color name or a hex code.
inherit The value of the property should be inherited from the parent element.
border-spacing

Vertical and horizontal distances and units that separate adjacent cell borders in tables. The value applies to all cells in the table. If the border-collapse property is set to 'collapse', then the values will have no effect. The first value of the property sets the horizontal spacing and the second sets the vertical spacing. If only one value is specified, it specifies both the horizontal and vertical spacing. The default value is '0 0'.

Option Description
<length> The distances and units that separate adjacent cell borders in tables.
inherit The value of the property should be inherited from the parent element.
border-style

Specifies the style of all four borders of an element.

Option Description
dashed Specifies a dashed border.
dotted Specifies a dotted border.
double Specifies a double border.
groove Specifies a 3D grooved border.
hidden The same as 'none'.
inset Specifies a 3D inset border.
none No border.
outset Specifies a 3D outset border.
ridge Specifies a 3D ridged border.
solid Specifies a solid border.
border-top-style, border-right-style, border-bottom-style, border-left-style

Specifies the style of the selected border. The default value is 'none'.

Option Description
dashed Specifies a dashed border.
dotted Specifies a dotted border.
double Specifies a double border.
groove Specifies a 3D grooved border.
hidden The same as 'none'.
inset Specifies a 3D inset border.
none No border.
outset Specifies a 3D outset border.
ridge Specifies a 3D ridged border.
solid Specifies a solid border.
inherit The value of the property should be inherited from the parent element.
border-width

Sets the width of all four borders. The default value is 'medium'.

Option Description
medium Specifies a medium border.
thick Specifies a thick border.
thin Specifies a thin border.
<length> Specifies the thickness of the border in length units.
inherit The value of the property should be inherited from the parent element.
border-top-width, border-right-width, border-bottom-width, border-left-width

Specifies the width of the selected border. The default value is 'medium'.

Option Description
medium Specifies a medium border.
thick Specifies a thick border.
thin Specifies a thin border.
<length> Specifies the thickness of the border in length units.
inherit The value of the property should be inherited from the parent element.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:mcs="http://www.volantis.com/xmlns/2006/01/xdime/mcs">
  <head>
    <title>Border properties</title>
    <style type="text/css">
      table {
        border-collapse: collapse;
        border-spacing: 10px 50px;
        border-top-color: #ff0000;
        border-right-color: red;
        border-bottom-color: #000000;
        border-left-color: #ff0000;
        border-top-style: dotted;
        border-right-style: dashed;
        border-bottom-style: groove;
        border-left-style: double;
        border-top-width: 15px;
        border-right-width: thin;
        border-bottom-width: 20px;
        border-left-width: thick;
      }
    </style>
  </head>
  <body>
    <table>
      <caption>Layout attributes</caption>
      <tr>
        <th>Attribute</th>
        <th>Description</th>
      </tr>
      <tr>
        <td>layoutName</td>
        <td>Name of the layout to use</td>
      </tr>
    </table>
  </body>
</html>

Related topics