Dynamic table width

Customer question:

I am attempting to generate tables that adjust their width dynamically with the width of the browser window, i.e, the text within the table wraps and the border shrinks when I reduce the width of the browser window. I have attempted to do this by selecting Table>Layout>Border Collapse>Collapse and/or Table layout>Auto and regenerating, but the tables still show a fixed width.

WebWorks response:

The border-collapse attribute just defines whether adjoining cell borders are combined (or collapsed) into a single border, rather than being displayed as separate borders for each cell. The problem you are seeing is likely caused when ePublisher passes the cell/column dimensions from FrameMaker straight into HTML output. That is, if each column is 1" wide so that the table fits on a standard printed page, then the table coumns will be 1" wide in the output, regardless of the size of the browser window. So, if you change the style attributes of the text within the table (e.g., use a different font or increase the size of the text), you may see unexpected effects, such as awkward text wrapping.

The best way to improve this behavior is to let the browser determine the proper width of the table and columns. In the ePublisher Pro Style Designer, choose the Table Styles section. Select each of the affected table styles, and disable the "Use Document Cell Widths" setting on the Options tab. You may also try changing the Width attribute (Properties > HTML > Width) to something like 99%. Then, save your project and regenerate output to apply the changes. If you get the look you're after, then update your stationery and continue producing output as before.

CategorySolutionsGraphics

Permalinks/Solutions/Graphics/DynamicTableWidth (last edited 2009-05-13 20:46:16 by LaurenLever)