On Tue, Sep 18, 2018, 3:38 AM Martin Dalgaard Villumsen <mvillumsen@health.sdu.dk> wrote:

How do I control the column width when exporting a table to HTML?

 

I know how to control the width of the table, but not the width of its columns. For example, I want the width of column A to be 2 cm and the width of B to be 4 cm:

 

|  A |  B |

|----+----|

| 11 | 12 |

| 21 | 22 |

 

Relative settings are also appreciated, A 33% and B 67% of total table width.

Hello,

This needs to be solved using CSS. See an example here: https://stackoverflow.com/questions/6253963/table-with-table-layout-fixed-and-how-to-make-one-column-wider

In that two solutions are suggested in the selected answer. You should be able to implement the first way using the "td+td" CSS rule. 

For the second way using the "col" tag, I don't have the computer accessible right now, to check if ox-html can insert that tag. Even if it did add that tag, you would need to specify the class string for each column, and then use CSS to set the width of each column class. 

Right now, the first method seems to be the best?/fastest/easiest way forward.