Forum


Replies: 3   Views: 4339
Spacing between two html tables
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 wwu_ivv_wiwi  · 23-02-2015 - 10:25

Hi, I am using the embedHTML function to add contents to my Docx. The content is structured in several < table > elements that follow each other. In word, there is an ugly spacing between two tables (see screenshot: http://cl.ly/image/1m1a103f342B ), although there is no < br > tag whatsoever between the HTML tables. Is there any way to programatically remove the spacing? Kind regards

Posted by admin  · 23-02-2015 - 12:57

Hello, Please try using a single embedHtml and setting the margin style for both table tags. Regards.

Posted by wwu_ivv_wiwi  · 23-02-2015 - 13:24

Hi, I am using a single embedHTML and had the top and bottom margins of the tables set to zero. Which works fine when viewing the HTML in browser, but does not work in the DocX. Regards

Posted by admin  · 23-02-2015 - 13:39

Hello, We have checked it drectly with Word. If you add a table after an existing table, Word doesn't allow to remove that line break (the space between tables). So you need to create all the content in the same table. Regards.