Tables

2 min read

Change Cell Alignment

Use the align and valign attributes to set the horizontal and vertical alignment for cells in a table. You can use these attributes to align individual cells, a row of cells, or all cells in a table. To align all cells in a column, you will need to use the table settings as described in Change Column Alignment.

To the left - Vertical alignment. To the right - Horizontal alignment

  1. Select the topic or component in the Content Manager to open it in the Editor.

    Alternatively, you can Create a Topic and edit that.

  2. Place the cursor in a table cell that you want to have different alignment.

  3. Select the appropriate element in the Element Structure Menu and then select Go to element.

    The appropriate element is:

    • tbody for all cells in a table except those in the header or footer

    • thead for all cells in the selected table header

    • tr for all cells in the selected row

    • td for the selected cell in the main body of the table

    • th for the selected cell in the table header

  4. In the Element attributes panel, add:

    • align if you want to change the horizontal alignment.

    • valign if you want to change the vertical alignment.

  5. Set the alignment value(s).

    For the align attribute, choose from:

    • Left - Aligns content to the left of the cell.

    • Right - Aligns content to the right of the cell.

    • Center - Aligns content to the middle of the cell.

    • Justify - Adds space between the characters in a cell. The first character of the first word is on the left boundary and the last character of the last word is on the right boundary.

    • Char - In DocBook XML, char can be used for aligning content to a specific character, usually a decimal point. Char is only included as part of our support for DocBook imports is not intended for use in Paligo.

    For the valign attribute, choose from:

    • Top - Positions the content at the top of the cell.

    • Middle - Positions the content in the center of the cell.

    • Bottom - Positions the content at the bottom of the cell.

    • Baseline - Positions the content at a common baseline position for that row. The baseline is the invisible line that text characters "sit" on. This setting applies to the first line of text in a cell, but can affect all cells in a single row.

  6. Repeat steps 2-5 inclusive for each row or cell that needs different alignment.

  7. Select Save.