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

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

The following lists the main CSS properties for tables, with possible values and examples.

table-layout

Table width adjustment

Controls table width adjustment:

1) auto: width follows content; more text means wider columns, less text narrower ones

2) fixed: forces the browser or reader to use specified widths.

Values

auto | fixed | inherit

Example

table-layout: fixed;

border-spacing

Internal table border spacing

Sets spacing between table contents and borders

Values

<Länge> <Länge>? | inherit

Example

border-spacing: 5mm;

caption-side

Positioning a table caption

Positions a table caption, the element <caption>. Values are:

1) top: top

2) bottom: bottom

Values

top | bottom | inherit

Example

caption-side: top;

border-collapse

Collapsing table borders

Controls borders between adjacent table cells:

1) collapse: borders collapse together.

2) separate: borders remain separate.

Values

collapse | separate | inherit

Example

border-collapse: collapse;

   

 

 

 

back to top