Forum


Replies: 5   Views: 4595
Width attribute on td element of an html table is ignored
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by cocciagialla  · 29-02-2016 - 08:34

Hi,

I am trying to create a docx from an $html like this:

<html>
<body>
<table style='width: 100%'>
<tr>
<td style='width: 40px; max-width: 40px;'>A</td>
<td style='width: 80px; max-width: 80px;'>BBB</td>
<td style='width: 80px; max-width: 80px;'>CCC</td>
</tr>
</table>
</body>
</html>

using:

$docx = new \CreateDocx();
$docx->embedHTML($html);

but the resulting table on the docx has all the columns of the same width.

 

Thanks

Gianluigi