emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Table column width and HTML export


From: Martin Dalgaard Villumsen
Subject: Re: [O] Table column width and HTML export
Date: Tue, 18 Sep 2018 10:51:30 +0000

I am not interested in editing the exported HTML file (conflicts the point of using org-mode)

 

I can add a class to the <table> tag with

 

#+ATTR_HTML: :class my-table

 

But I don’t know how to add a new class to <col> in org-mode; or how to define a custom column (one that is now <r>, <l>, <c>).

 

No point in CSS-restyling default class="org-center", class="org-left", etc.  … this would affect columns in other tables

 

 

/Martin

 

From: Kaushal Modi [mailto:address@hidden
Sent: 18. september 2018 12:31
To: Martin Dalgaard Villumsen <address@hidden>
Cc: address@hidden
Subject: Re: [O] Table column width and HTML export

 

On Tue, Sep 18, 2018, 3:38 AM Martin Dalgaard Villumsen <address@hidden> 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,

 

 

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. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]