Skip to content

Table rendering issues when using Html::addHtml() #1636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 3 tasks
catalinbuletin opened this issue Jun 3, 2019 · 1 comment
Open
2 of 3 tasks

Table rendering issues when using Html::addHtml() #1636

catalinbuletin opened this issue Jun 3, 2019 · 1 comment

Comments

@catalinbuletin
Copy link

catalinbuletin commented Jun 3, 2019

This is:

Expected Behavior

I expect that borders are shown and cell padding is added.

Current Behavior

No border and padding are shown

How to Reproduce

This is part of the HTML string i'm adding to the Html::addHtml method

<table style="width: 100%; padding: 5px; border: 1px solid #000000; border-collapse: collapse;" border="1" cellpadding="5">
<tbody>
<tr>
<td style="width: 33.3333%;">Abc</td>
<td style="width: 33.3333%;">Def</td>
<td style="width: 33.3333%;">Hij</td>
</tr>
<tr>
<td style="width: 33.3333%;">Klm</td>
<td style="width: 33.3333%;">Nop</td>
<td style="width: 33.3333%;">Qrs</td>
</tr>
<tr>
<td style="width: 33.3333%;">Stt</td>
<td style="width: 33.3333%;">Vvx</td>
<td style="width: 33.3333%;">Xyz</td>
</tr>
</tbody>
</table>

Strange thing with the border attribute that is set on the table:

IF border: 1px #000000 solid will add borders as expected
IF border: 1px solid #000000 - will NOT add borders at all

Context

  • PHP version: 7.2
  • PHPWord version: 0.16.0
0b10011 added a commit to 0b10011/PHPWord that referenced this issue Aug 30, 2019
@0b10011
Copy link
Contributor

0b10011 commented Aug 30, 2019

I have a fix for this that I'll submit once #1669 is merged (see reference above for code changes).

0b10011 added a commit to 0b10011/PHPWord that referenced this issue Aug 30, 2019
0b10011 added a commit to 0b10011/PHPWord that referenced this issue Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants