percentages for column widths don't render as expected

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
mjp
Posts: 12
Joined: Wed Feb 10, 2016 11:32 pm

percentages for column widths don't render as expected

Post 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?
cosminef
Site Admin
Posts: 126
Joined: Wed Aug 30, 2023 2:33 pm

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

Post 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
Cosmin Eftenie
www.oxygenxml.com
mjp
Posts: 12
Joined: Wed Feb 10, 2016 11:32 pm

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

Post by mjp »

This issue only occurs during editing.
cosminef
Site Admin
Posts: 126
Joined: Wed Aug 30, 2023 2:33 pm

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

Post 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
Cosmin Eftenie
www.oxygenxml.com
mjp
Posts: 12
Joined: Wed Feb 10, 2016 11:32 pm

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

Post by mjp »

ok thank you for the information!
Post Reply