Defining a table style (AskiaVista)

To define a table style, you first need to download a table style file from AskiaVista (if you have not already done so). You then edit this file to define your table style and finally upload your amended file. This topic assumes you have already downloaded the file, and describes how to edit it.

This article assumes you have at least basic knowledge of CSS. A good introduction to CSS can be found in Getting Started with CSS by the Mozilla Developer Network. You will also find links below that contain information and hints on editing style sheets.

When you download the table style file, it is contained in a zip file with two other files. The file name consists of the table style name and the suffix zip (so if the downladed table style is called stylegreen, the zip file will be called stylegreen.zip). When you extract the contents of this file, you will find the following elements:

  1. CSS or LESS file: this style sheet contains the table style definition. This is the file you need to edit in order to define your table style.

  2. index.html provides a sample set of tables (including flat counts, cross-tabs with and without edges, ...) so you can easily test your table style before uploading it back to the AskiaVista server. Simply double-click the file to open it in your web browser, with your table style in effect. Note that the CSS or LESS file must be in the same folder as index.html for its definition to take effect.

  3. selectors.html is provided for reference, and it details each rule contained within the style sheet.

Editing the table style

Note: If you would like information and hints on editing style sheets, there are several external articles linked to below that you may find useful.

To edit the table style:

  1. Open index.html and selectors.html in your favourite web browser.

  2. Open the CSS or LESS file in your favourite text editor (we recommend using a sophisticated text editor like Notepad++ or TextPad, rather than Notepad or Wordpad). For example, it may appear as follows (click the image to enlarge):

  3. Make the desired edits. In the following example, we modify the rule for the table's caption class (the table header) to change the colours, text shadows, etc.:

  4. You can see the effect your changes have made by viewing the file index.htm in your web browser (refresh the page if you already have it loaded):

  5. Once you are satisfied with your changes to the table style, you should save it under a new name.

  6. You should now upload the new style file to AskiaVista.

Information and hints on editing style sheets

You may find the following external articles useful when editing style sheets:

Create your own Knowledge Base