EXAMPLES OF TABLES
Tables can be problematic if they are not responsive - in other words, if they do not adapt when being accessed via mobile devices. In the below example, we show you a table at the top, how the table would look on a mobile device if it was not responsive (lower left), and how it could be made responsive so it works better on a mobile device (lower right):
Build a Table
Our goal is to create a 4 column 4 row table for advising.
- Click on the dropdown arrow attached to the Insert a Table icon (see #1 below)
- Click on the grid to make the table 4 rows by 4 columns (see #2 and #3 below)
Resize Initial Table
- Place the mouse on the lower right "handle" of the table and drag it down and to the right (see below)
- This will resize the table; each cell should be the same size.
Inserting and deleting rows and columns
To add or remove rows and columns, you can use the buttons located to the right of Inserts a New Table:
- To add a row above an existing row, click inside a cell in the existing row, then click the Insert Row Before button (see #1 below):
- To add a row below an existing row, click inside a cell in the existing row, then click the Insert Row After button (see #2 below):
- To delete an existing row, click inside a cell in the existing row, then click the Delete Row button (see #3 below):
- To add a column to the left of an existing column, click inside a cell in the existing column, then click the Insert Column Before button (see #4 below):
- To add a column to the right of an existing column, click inside a cell in the existing column, then click the Insert Column After button (see #5 below):
- To delete an existing column, click inside a cell in the existing column, then click the Delete Column button (see #6 below):
Adjust Table
Change width of ONE column (cell)
- Select a cell in the table
- Click the Table Cell Properties button (see #1 below):
- Change the Scope to "Column" so that your change will affect the entire column (see #1 below)
- Enter a larger number for "Width" (such as 200) to increase the width of the column to an equivalent number of pixels (see #2 below)
Add Borders to the Table
- Place the cursor in any cell, then click on the Insert a Table Icon.
- Click the check box to the right of "Border" (see #1 below)
- Click the Update button to the lower right (see #2 below)
Add content to table
Things to consider when entering data:
- Do NOT hit your <ENTER> key while entering data (that could give you additional lines in each cell.
- If you hit your <TAB> key, that will take you into the new cells
- If you are on the last cell of the table and you hit your <TAB> key, it will add an additional row to the table.
Set Cells to Header
- Place the cursor in the cell to be formatted as a header
- Click the Table Cell Properties button
- Change "Cell type" to "Header" (see #1 below)
- Change "Scope" to "Row" (see #2 below)
- Click the Update button to the lower right (see #3 below)
Delete a Row
- Place the cursor in a cell within the row to be deleted
- Click the Delete Row button (see #1 below):
Make a table Responsive
- Place the cursor in any cell, then click on the Insert a Table Icon.
- Click the "Advanced" tab (see #3 below)
- Select "sas-responsive-tbl" from the "Classes" dropdown menu (see #4 below)
- Click the Update button to the lower right (see #5 below)
Possible Issues with Tables in Responsive Mode:
- When making the table RESPONSIVE, make sure that in the TABLE PROPERTIES there are no SIZE SETTINGS (for either height or width). That can ‘break’ the table by preventing it from dynamically resizing.
- Also verify that in the CELL PROPERTIES there are NO WIDTH SETTINGS.
Make Striped Responsive Table
The steps are the same for making a table responsive, with one addition: After selecting "sas-responsive-tbl" from the "Classes" dropdown menu, select "table-striped" from the "Classes" dropdown menu:
Your responsive, striped table will look like the following examples on a desktop and on a mobile device:
Remove extra <p> tags
If accidentally you hit the <ENTER> key within a table cell, you may notice that the table rows end up being different heights. To undo this, you can remove the <p> tags from the cells.
- Place the cursor within a cell that has a "P" in it (indicating a paragraph tag) (see #1 below)
- Click on the "Paragraph" dropdown menu (see #2 below)
- Select "Format"; this will remove the paragraph tag from that cell.(see #3 below)