Managing column widths

Navigation:  Basic Working Procedures > Working with Tables >

Managing column widths

Previous pageReturn to chapter overviewNext page

Show/Hide Hidden Text

By default, the widths of all columns in tables are "dynamic" they expand to fit the width of the content they contain and the defined width of the table. After you create a table you can adjust the widths of columns by dragging their borders with the mouse and by setting their widths to absolute or percentage values in the Table Properties dialog.

You can also "lock" the widths of columns. This can be necessary if you are using tables as a layout tool and want to have column widths that do not change dynamically when the users adjusts the size of the help viewer window.

How you define your column widths is crucial for how your tables behave in your published output, in particular in formats like PDF and RTF where the tables must fit inside a fixed page width.

Click to expand/collapseRelationship of column width to table width

The table width is defined when you create the table and can be changed with the Properties tool in the Table tab. The width can be dynamic or fixed.

In tables with dynamic widths (autosize, percentage widths and 100%/fit to page) you must always have at least one column with a dynamic width that can resize to allow the table to resize. If you do not Help & Manual will make all column widths dynamic in your output and the results may be unexpected.

Click to expand/collapseSetting and changing column widths

To adjust the width of a column you must make its width fixed, otherwise it will expand automatically to fit its content. You do this by dragging the column dividers with the mouse or by changing the settings in the Table Properties dialog.

Drag column dividers with the mouse
This will lock the width of both affected columns. If you want one of the columns to be dynamic click on the Lock Column tool (see below) in the Table tab to unlock it again after resizing.

Use Table Properties
Click in a column or click and drag to select two or more columns. Then select the Selected Cells tab in Table > Properties and enter a width value in percent or pixels.

Use the Lock Column tool
When working with column widths use the Lock Column  tool in the Table tab while you are working to lock and unlock the widths of columns. It also shows you whether the current column is locked or unlocked.

Column widths in complex tables:

If you merge and split cells in a table you will find that some widths cannot be changed beyond a certain point because the rows and columns no longer extend across the entire height and width of the table. In some cases you may have to use nested tables or multiple tables to achieve the widths you need.

Click to expand/collapseThe Lock Column tool

The Lock Column tool in the Table tab sets the width of the selected column or columns to a fixed value in pixels. In locked columns selecting the tool unlocks the column and makes it dynamic again.

You can also access the same function by right-clicking in the column or by setting a fixed width in pixels for Selected Cells in Table > Properties.

Click to expand/collapsePossible and impossible column widths

The column widths you set will only be used if they are possible, otherwise you will have problems in your output:

If all column widths are in percent their total must be exactly 100%, otherwise they will all be ignored.

Avoid mixing columns with percentage widths and pixel widths in fixed-width tables. Browsers, particularly the famously competent Microsoft Internet Explorer, will often interpret these "mixed widths" incorrectly.

If the table width is dynamic ("autosize" or "percent") you must always have at least one dynamic column.

If your column width settings are contradictory or impossible all columns will be made dynamic in your output and the results may be unexpected!

Click to expand/collapseColumn widths and PDF/RTF output

PDF and RTF files have fixed margins and fixed page widths. This means that your tables and their content must fit inside the margins of your pages in these formats. If they do not fit with the defined column widths Help & Manual will make all the column widths dynamic to force the table to fit. The results may be unexpected!

You should always have at least one dynamic column in your tables to allow the table width to be adjusted to fit on the PDF or RTF page. Adjustable columns should only contain wrapping text, fixed-width content like graphics or paragraphs with word wrap turned off (for example program code examples) will prevent column width adjustment.

See also:

Table Properties (Reference)

How table sizing works (Reference)