Editing Table Styles in Regular Stylesheets

You can modify the look and feel of multiple tables at once by editing standard HTML table styles (e.g., table, th, td, tr) in your regular stylesheet. For example, you might use these styles in order to control the look of the text that appears in your table headings (th style) or within the cells (td style).

How to Edit Table Styles in a Regular Stylesheet

  1. From the Content Explorer, open the stylesheet that you want to modify.
  2. Complete one of the following sets of steps, depending on whether you want to use the Simplified view or Advanced view in the Stylesheet Editor.

    • Simplified The Simplified view displays styles in a grid view and is often best for brand new users.

      This view provides an easy way to apply properties to styles, with format options available from a toolbar and dialogs (similar to the way one would use an interface such as Microsoft Word). In some cases, only the most common property options are available in the Simplified view (e.g., font, letter/word spacing, paragraph alignment/indentation, autonumbering format, borders, background). One advantage of the Simplified view is that you can apply a property to multiple styles at the same time. You can also click a check box to hide the properties in the editor, allowing you to see only the styles.

    • Advanced The Advanced view displays styles in a tree structure, and despite the name, is user friendly for authors of all levels.

      For the properties, you can toggle between a grouped display and an alphabetical display. The Advanced view of the Stylesheet Editor lets you edit more settings than are available in the Simplified view. In addition, the Advanced view lets you see and apply settings to multiple mediums and media queries at the same time.

    Warning Mediums can be used if you want to use one group of settings for online output types and another group of settings for print-based output types. For example, you might use the default medium for your online outputs and the print medium for your print outputs.  From the Medium drop-down in the Stylesheet Editor, make sure the proper medium is selected before you begin. In the Advanced view, you can open multiple mediums at once; you just need to look at the title at the top of the medium pane and make sure you are working in the correct one. If you are not using stylesheet mediums for your different outputs or if you want all mediums to have the same settings, just leave the medium set to default and continue. Please note that Flare remembers the last medium that you used when working in the stylesheet, so it may or may not be the one that you want to use the next time around. See Mediums and Media Queries.

    If Using Simplified View

    1. In the local toolbar, make sure the first button displays Simplified View button (which means that the Simplified view is currently shown in the editor). If the button displays Advanced View button instead, then click it.
    2. In the upper-left corner of the editor, click in the drop-down field and select .
    3. From the grid below, select the appropriate table style.
      • caption Modifies the table caption, which is a short title or description of the table's purpose. When inserting or editing a table, you can add a caption above or below the table.
      • col Groups together attribute specifications for table columns. The <col> elements are empty and serve only as a support for attributes. They may appear inside or outside an explicit column group (i.e., <colgroup> element).
      • colgroup Groups columns together structurally. The number of columns in the column group may be specified by using the element's <span> tag or by the <col> element, which represents one or more columns in the group.
      • table Modifies an entire table. It contains all other elements that specify caption, rows, content, and formatting.
      • tbody Modifies the main rows in a table (i.e., not the header or footer rows). Each <tbody> tag must have at least one <tr> tag within it, which is used to represent a single row.
      • td Modifies the data (or content) in the primary cells of a table. When you press ENTER after the first paragraph in a table cell, a paragraph <p> tag is added inside each <td> tag in that cell.

      • tfoot Modifies a footer row in a table. When a table requires multiple pages in print layouts and outputs, the footer row is placed at the bottom of the last page. Each <tfoot> tag must have at least one <tr> tag within it, which is used to represent a single row.
      • th Modifies the header content in a table. Why not just use the <td> tag for header content as well? First, by having different tags, you can more easily dictate one look for the header text (e.g., bold font) and a different look for the main content in the table (e.g., normal font). Second, using separate tags greatly assists users with visual disabilities, making it possible for multi-modal wireless browsers with limited display capabilities (e.g., Web-enabled pagers and phones) to handle tables. When you press ENTER after the first paragraph in a table cell, a paragraph <p> tag is added inside each <th> tag in that cell.
      • thead Modifies a header row in a table. When a table requires multiple pages in output, the header row is repeated by default at the top of each page. Each <thead> tag must have at least one <tr> tag within it, which is used to represent a single row.
      • tr Modifies single rows that are contained within <tbody>, <tfoot>, and <thead> tags.

      For more about each of these, please refer to http://www.w3c.org.

    4. In the local toolbar of the editor, click Display properties for the selected item.. The Properties dialog opens.
    5. Use the fields on the various tabs to modify the settings for the style. The tabs included in the dialog depend on the type of style that you have selected.

      Most tabs are the same as those used for regular paragraph formatting. For details about using the features on these tabs, see Paragraph Formatting.

      For example, you might want to adjust the vertical alignment of text (e.g., top, middle, bottom) in the td and th styles. You can do this by expanding the Cell property group and setting the vertical-align property.

    6. In the Properties dialog, click OK.

    If Using Advanced View

    1. In the local toolbar, make sure the first button displays Advanced View button. If the button displays Simplified View button instead, then click it.
    2. In the upper-left corner of the editor, click in the drop-down field and select .
    3. From the area below, select the appropriate table style.
      • caption Modifies the table caption, which is a short title or description of the table's purpose. When inserting or editing a table, you can add a caption above or below the table.
      • col Groups together attribute specifications for table columns. The <col> elements are empty and serve only as a support for attributes. They may appear inside or outside an explicit column group (i.e., <colgroup> element).
      • colgroup Groups columns together structurally. The number of columns in the column group may be specified by using the element's <span> tag or by the <col> element, which represents one or more columns in the group.
      • table Modifies an entire table. It contains all other elements that specify caption, rows, content, and formatting.
      • tbody Modifies the main rows in a table (i.e., not the header or footer rows). Each <tbody> tag must have at least one <tr> tag within it, which is used to represent a single row.
      • td Modifies the data (or content) in the primary cells of a table. When you press ENTER after the first paragraph in a table cell, a paragraph <p> tag is added inside each <td> tag in that cell.

      • tfoot Modifies a footer row in a table. When a table requires multiple pages in print layouts and outputs, the footer row is placed at the bottom of the last page. Each <tfoot> tag must have at least one <tr> tag within it, which is used to represent a single row.
      • th Modifies the header content in a table. Why not just use the <td> tag for header content as well? First, by having different tags, you can more easily dictate one look for the header text (e.g., bold font) and a different look for the main content in the table (e.g., normal font). Second, using separate tags greatly assists users with visual disabilities, making it possible for multi-modal wireless browsers with limited display capabilities (e.g., Web-enabled pagers and phones) to handle tables. When you press ENTER after the first paragraph in a table cell, a paragraph <p> tag is added inside each <th> tag in that cell.
      • thead Modifies a header row in a table. When a table requires multiple pages in output, the header row is repeated by default at the top of each page. Each <thead> tag must have at least one <tr> tag within it, which is used to represent a single row.
      • tr Modifies single rows that are contained within <tbody>, <tfoot>, and <thead> tags.

      For more about each of these, please refer to http://www.w3c.org.

    4. From the Show drop-down list on the upper-right side of the editor, select Filter using the drop-down to show assorted relevant properties in the stylesheet.. The most relevant properties for that style are shown on the right side of the editor.
    5. (Optional) You can use the toggle button in the local toolbar to show properties below in a group view Stylesheet local toolbar button to show properties in a group view. or an alphabetical view Stylesheet local toolbar button to show properties in an alphabetical view..
    6. Locate the property you want to change.

      Most of the relevant properties are the same as those used for regular paragraph formatting. For details about using the features on these tabs, see Paragraph Formatting.

    7. The area to the right of the property is used for selecting and entering values. If you know how to enter the information correctly, you can click in the value field and type it directly. Otherwise, click the ellipsis button Display more options. to the right of the property. Depending on the type of property, the appropriate controls and options display, allowing you to choose or enter values (e.g., select from a drop-down list, click a button, complete fields in a dialog or popup). If you completed values in a popup, click OK at the bottom of the box.

      For example, you might want to adjust the vertical alignment of text (e.g., top, middle, bottom) in the td and th styles. You can do this by expanding the Cell property group and setting the vertical-align property.

  3. Click Save the active file. to save your work.

How to Create Advanced Selectors for Table Styles

When you insert a table, it is set up by default to use standard table tags in the individual cells (e.g., <th> for table headers, <td> for regular table text). However, if you press ENTER at the end of a line, a <p> tag is added within the standard tag. Therefore, in order to keep all of the content in your table cells looking consistent, there are a couple of things you can do. First, if you are editing table styles in a regular stylesheet, you can create advanced selectors (e.g., "td p"). Second, you may want to create a special style class of the p style to be used for table content (e.g., p.tabletext) and apply that style to all of your cells when you first create a table. You can manually apply specific styles to tables by selecting the table cells, clicking Table > Cell Content Style, and choosing the style to be used for those cells.

Following are steps for using advanced selectors in a regular stylesheet. For details on using the Cell Content Style feature, see Selecting Styles for Table Cell Contents. Also see the Tables Tutorial.

Note For most projects, using an advanced selector in a regular stylesheet is probably the best method to control the look of table cell content. Just use it with caution because it will affect all paragraph tags in all tables. If you want to have a different default look for paragraph content depending on the table, it might be better to use the cell content style.

 

  1. In the local toolbar of the Stylesheet Editor, click Add Selector.
  2. In the dialog, click in the HTML Element field and enter a table style (e.g., td, th). Then click the Advanced Options down arrow to show more fields.
  3. In the Advanced Selector field, add a space after the table style, then type p (e.g., td p).

    This is a special style where you are telling Flare that when it finds a <p> tag within a table tag (e.g., <td>), you want it to look a certain way.

  4. Click OK.
  5. Filter the Stylesheet Editor to show All Styles, and at the top of the list of styles, expand (Complex Selectors).

  6. Under (Complex Selectors), scroll down and select your advanced selector (e.g., td p). Then set properties for it on the right side of the editor. You probably want to set the same properties that you set on the main table style. For example, if you set a font size of 12pt on the td style to control content in regular body cells of a table, you likely want to set the same font size on a "td p" advanced selector.
  7. Click Save the active file. to save your work.

What’s Noteworthy?

Warning When controlling the look of tables, be aware of conflicts that can arise when you are using standard table styles (e.g., tr, td) from a regular stylesheet and you are also inserting proxies in the project. For example, if you set the text-indent property on the td style, it could affect the indentation of a generated table of contents or mini-toc.

Note In addition to (or instead of) using styles in a regular stylesheet, you can also use custom table stylesheets to modify the look and feel of multiple tables at once. These table stylesheets let you easily and quickly create patterns and different looks for tables. See Editing Table Stylesheets.