2021.2

Table Of Contents
Styling a Dynamic Table
The Insert Dynamic Table wizard lets you select a style for the table.
Tables are styled via CSS: when the wizard adds a Table, the chosen theme's class is added
to the <table> element, and, if it doesn't exist yet, the default_table_styles.css file is added to
the resources of the template. This CSS file contains the CSS rules for all table themes. (See:
"Styling templates with CSS files" on page747.)
To change the theme, you could simply select the table and change its class on the "Attributes
pane" on page1059.
The available theme classes are: table--grid, table--colgrid, table--minimalist, table--dark, table-
-light, table--striped, table--topbar, table--portfolio. (Note the double dash in the class name.)
The default_table_styles.css file is read-only, but of course you could overwrite styles and
create your own theme, using your own style sheets.
Regardless, you can change the font, font size and color, the borders, the cell padding (the
distance between the edge of the cell and its content), and the background color or image of the
table and its cells, via the Formatting dialog.
Both approaches are explained in the topic: "Styling a table" on page768.
Dynamic Tables are best styled via CSS (see "Via a style sheet" on page769), for two reasons:
l With local formatting, all rows that are added on the fly (in Preview mode and in output)
will look exactly the same as the first one. Alternating row colors, for example, in
dynamically added rows can only be done via CSS.
l When generating output from a template, a Dynamic Table is created slightly faster when
it's styled via Cascading Style Sheets than when it's styled with local formatting.
Here are a few tips on how to target rows and cells in a Dynamic Table.
l There are CSS selectors with which you can target every so-maniest row (see "Styling
the first, last and nth rows" on page770).
l In the output, Dynamic Table rows are repeated including any classes that are set on the
row and on its contents.
l Dynamic Tables and their rows and cells have some special attributes that can be used
as selector. See: "A Dynamic Table's data- attributes" on page838.
Page 836