Controlling text wrapping in a table

Ordinarily, text in a table is automatically “wrapped” (broken into multiple lines) by browsers so that the width of the table does not exceed the width of the browser window. However, there may be instances when you do not want text in a particular cell or set of cells to be automatically wrapped, even if keeping the text on one line would require the table to be wider than the window. For example, the cells in the first column of a table may contain labels that you want always to appear on a single line, regardless of the size of the browser window.

In such cases, you can specify that a cell be excluded from automatic text wrapping. If a cell has the nowrap attribute, browsers will always try to keep each paragraph in the cell on a single line. If necessary, cells in other columns will be made narrower, even if they have specified widths. If other columns can be shrunk no further, the browser will make the table wider, without regard to the width of the window.

Namo Web Editor icon note Controlling text wrapping in a tableIf a cell has a specified width in pixels, text in the cell will be wrapped if necessary to respect the specified width even if the nowrap attribute has been set.

To prevent text wrapping in selected cells
  1. Select the desired cell(s).
  2. Right-click and click Table Properties.
  3. Click the Cell tab, and select the No wrap check box.

Namo Web Editor icon note Controlling text wrapping in a tableThe effect of using the nowrap attribute is not apparent in Edit mode. To view the effect of nowrap, switch to Preview mode.

Controlling text wrapping in a table