Page 1 of 1

percentages for column widths don't render as expected

Posted: Fri Jun 14, 2024 10:18 pm
by mjp
A cals table does not render with the expected width in the browser when percentages are used for the col widths. It does work with proportional widths.

For example, this renders at 100% width of the page:

Code: Select all

<table>
                <tgroup cols="2">
                    <colspec colname="c1" colnum="1" colwidth="1*"/>
                    <colspec colname="c2" colnum="2" colwidth="1*"/>
But this does not:

Code: Select all

<table>
                <tgroup cols="2">
                    <colspec colname="c1" colnum="1" colwidth="50%"/>
                    <colspec colname="c2" colnum="2" colwidth="50%"/>
I have tried setting width to 100% for all tables in the css but it does not get applied. Is there we can do in the css to get these tables to display at 100% width?

Re: percentages for column widths don't render as expected

Posted: Mon Jun 17, 2024 2:12 pm
by cosminef
Hello,

Thank you for contacting us.
Would you like the column width to be rendered in the output or during editing?

Best,
Cosmin

Re: percentages for column widths don't render as expected

Posted: Mon Jun 17, 2024 3:25 pm
by mjp
This issue only occurs during editing.

Re: percentages for column widths don't render as expected

Posted: Mon Jun 17, 2024 6:03 pm
by cosminef
Hello,

CALS tables do not support column widths specified in percentages (%) according to the standard [1].
To achieve the desired behavior, use proportional measures (1*, 2*, etc.) or fixed units (pt, cm, mm, pi, in) for colwidth attributes in your colspec elements.

[1] https://www.oasis-open.org/specs/a502.h ... sep%20%3Dx

Best,
Cosmin

Re: percentages for column widths don't render as expected

Posted: Mon Jun 17, 2024 8:27 pm
by mjp
ok thank you for the information!