emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Martin Dalgaard Villumsen <mvillumsen@health.sdu.dk>
Cc: Emacs-orgmode@gnu.org
Subject: Re: Table column width and HTML export
Date: Tue, 18 Sep 2018 06:31:18 -0400	[thread overview]
Message-ID: <CAFyQvY00Dm4sCsDGmNdvQJYoPmZ2SV4WVZjLYDnE4VhFv=K77w@mail.gmail.com> (raw)
In-Reply-To: <ef0b4cab350740f4998694695fee2513@health.sdu.dk>

[-- Attachment #1: Type: text/plain, Size: 1158 bytes --]

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.

>

[-- Attachment #2: Type: text/html, Size: 2997 bytes --]

  parent reply	other threads:[~2018-09-18 10:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  7:37 Table column width and HTML export Martin Dalgaard Villumsen
2018-09-18  7:55 ` Eric S Fraga
2018-09-18 10:31 ` Kaushal Modi [this message]
2018-09-18 10:51   ` Martin Dalgaard Villumsen
2018-09-18 11:26     ` Kaushal Modi
  -- strict thread matches above, loose matches on Subject: below --
2018-09-18 11:34 Martin Dalgaard Villumsen
2018-09-18 18:25 ` Kaushal Modi
2018-09-19 14:25   ` Martin Dalgaard Villumsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY00Dm4sCsDGmNdvQJYoPmZ2SV4WVZjLYDnE4VhFv=K77w@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=Emacs-orgmode@gnu.org \
    --cc=mvillumsen@health.sdu.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).