Shortcodes

Shortcodes

[heading size=”h2″ style=”uk-module-title”]Tables[/heading] [alert style=”danger”]This section doesn’t use shortcodes but rather, it uses basic html. In that case you’ll need to toggle the editor view (if you are using editors like TinyMCE) to html mode to be able to create your table.[/alert]

To create clean formatted tables using uikit style, add the uk-table class to a table. The table rows will be separated by lines.

Table caption
Table Heading Table Heading Table Heading
Table Footer Table Footer Table Footer
Table Data Table Data Table Data
Table Data Table Data Table Data
Table Data Table Data Table Data

[toggle_code open=”false” title=”show code”]<table class=”uk-table”> <caption>…</caption> <thead> <tr> <th>…</th> </tr> </thead> <tfoot> <tr> <td>…</td> </tr> </tfoot> <tbody> <tr> <td>…</td> </tr> </tbody> </table>[/toggle_code] [heading size=”h3″ style=”uk-module-title”]Style variation[/heading]

You can add more styling to the table by using a combination of classes to improve the visual appearance of your table

[icon style=”icon-gear”/] Settings [icon style=”icon-leaf”/] Productivity [icon style=”icon-usd”/] Totals
Totals $ 49,000.00
Table Data Table Data $ 10,000.00
Table Data Table Data $ 15,000.00
Table Data Table Data $ 24,000.00

[line_break/] [toggle_code open=”false” title=”show code”]<table class=”uk-table uk-table-hover uk-table-striped”> <thead> <tr> <th>[icon style=”icon-gear”/] Settings</th> <th>[icon style=”icon-leaf”/] Productivity</th> <th>[icon style=”icon-usd”/] Totals</th> </tr> </thead> <tfoot> <tr> <td>Totals</td> <td></td> <td>$ 49,000.00</td> </tr> </tfoot> <tbody> <tr> <td class=”uk-width-2-10″>Table Data</td> <td class=”uk-width-5-10″>Table Data</td> <td class=”uk-width-3-10″>$ 10,000.00</td> </tr> <tr> <td class=”uk-width-2-10″>Table Data</td> <td class=”uk-width-5-10″>Table Data</td> <td class=”uk-width-3-10″>$ 15,000.00</td> </tr> <tr> <td class=”uk-width-2-10″>Table Data</td> <td class=”uk-width-5-10″>Table Data</td> <td class=”uk-width-3-10″>$ 24,000.00</td> </tr> </tbody> </table>[/toggle_code] [line_break/]

You can view more examples and classes that you can use from here