Login  Register

Re: table width

Posted by mojavelinux on Nov 28, 2015; 1:12am
URL: https://discuss.asciidoctor.org/table-width-tp3940p3985.html

Tim,

You can disable the 100% width on the tables using the %autowidth option.

[%autowidth]
|===
| A | B
|===

The percentages on the col tags only dictate relative widths. They add up to 100%, but they do not affect the table width (the values are relative of the calculated table width by the browser).

Cheers,

-Dan

On Wed, Nov 4, 2015 at 10:41 AM, timm [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I'm trying to get (HTML) tables which are as narrow as possible. By default, the table width is 100% and every column has the same width.
The table width is controlled by the 'table.spread' in the css, so I can overwrite that. But the column width is encoded in the html: e.g.

<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>

I my case, I would like to get rid of this colgroup or overwrite it, so that columns are only as wide as needed. Is this possible?

Best regards,
Tim


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/table-width-tp3940.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen