html-to-docx icon indicating copy to clipboard operation
html-to-docx copied to clipboard

`td` widths are not honored

Open amrita-syn opened this issue 2 years ago • 3 comments

Column (td level) widths are now supported by adding style="...; width: 25%; ..." to the td elements. Closing issue.

I can't for the life of me get td: width to work with the latest release. The resulting docx just gives two 50% columns.

Here's my code:

<table style="text-align: left; border:0px solid white; width: 100%; table-layout: fixed"> <tr style="border: 0px;"> <td style="border: 0px; width: 40%"> <p>Some Text Here</p> </td> <td style="border: 0px; width: 40%"> <p>some more text</p> </td> </tr> </table>

Originally posted by @Coachall in https://github.com/privateOmega/html-to-docx/issues/2#issuecomment-948461918

amrita-syn avatar Dec 08 '21 18:12 amrita-syn

Same problem here : the width of td elements is not taken into account and the resulting docx just gives two 50% columns...

betaWeb avatar Dec 09 '21 08:12 betaWeb

Has anyone been able to fix it somehow?

fenrircl avatar Feb 22 '22 13:02 fenrircl

Addressed in #164 for pixels, not percentages

nicolasiscoding avatar Nov 10 '22 04:11 nicolasiscoding