Forum


Replies: 3   Views: 5371
Image center alignment in table td
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 labuser  · 24-09-2015 - 12:00

i create a html table in php using style tags in the td element, eg. one row: tr td style="text-align:left;"img src="...." width="355"/td td style="width:10%;"/td td style="text-align:right;"img src="..." width="355"/td /tr (of course i use < and >) but the text-align statement, has no effect in word (in html it gets displayed correctly), the images inside the table are all left, what shall i do? Our PHP docx version is 4.1.

Posted by admin  · 25-09-2015 - 07:46

Hello, Please try using the align attribute in the tag image. Regards.

Posted by labuser  · 25-09-2015 - 09:43

Hello, We have already try that but did not work it. It is work for left & right possession but did not work for centre so please let me know on same.

Posted by admin  · 25-09-2015 - 11:57

Hell,

The easiest approach is adding a paragraph container with a text-align style:

<p style="text-align: center;"><img src="image.png" width="35" height="35"></p>

Regards.