html-to-docx
html-to-docx copied to clipboard
`td` widths are not honored
Column (
td
level) widths are now supported by addingstyle="...; width: 25%; ..."
to thetd
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
Same problem here : the width of td elements is not taken into account and the resulting docx just gives two 50% columns...
Has anyone been able to fix it somehow?
Addressed in #164 for pixels, not percentages