XML technologies / ePUB / CSS essentials / Important CSS properties / Borders

(Excerpt from “E-Books mit ePUB ─ Von Word zum E-Book mit XML” by Dr. Victor Wang)

The table lists the main CSS properties for borders, with possible values and examples.

border-style

Border style

Defines border style. Main values:

1) solid: solid line

2) double: double solid line

3) dashed: dashed line

4) dotted: dotted line

5) none/hidden: no border

Values

<Rahmen-Stil>{1,4} | inherit

Example

border-style: double;

border-top-style
border-right-style
border-bottom-style
border-left-style

Border style

Sets an individual border style; see border-style

Values

<Rahmen-Stil> | inherit

Example

see border-style

border-top-width
border-right-width
border-bottom-width
border-left-width

Border width

Sets an individual border width; see border-width

Values

<Rahmendicke> | inherit

Example

see border-width

border-width

Border width

Sets border width with CSS units or these values; readers may convert measurements into them:

1) thin: thin

2) medium: medium

3) thick: thick

Values

<Rahmendicke>{1,4} | inherit

Example

border-width: 0.5pt;

border-color

Border color

Sets border color using RGB or one of 16 VGA names.

Values

[<Farbe> | transparent]{1,4} | inherit

Example

border-color: #33ffaa;

border-top-color
border-right-color
border-bottom-color
border-left-color

Border color

Sets an individual border color; see border-color

Values

<Farbe> | transparent | inherit

Example

see border-color;

border-top
border-right
border-bottom
border-left

Border formatting

Sets an individual border; see border

Values

[ <Rahmendicke> || <Rahmen-Stil> || ʼborder-top-colorʼ ] | inherit

Example

see border

border

Border formatting

Shorthand for all border properties (border-style, border-width and border-color, in that order separated by spaces)

Values

[ <Rahmendicke> || <Rahmen-Stil> || ʼborder-top-colorʼ ] | inherit

Example

border: 1px solid #44444;

   

 

 

 

back to top