We recommend you to read the available documentation about HTML to DOCX:
For example, about div tags as explained in the previous pages:
div: Although this tag is probably the most frequent in modern HTML code, it does not have a direct translation into Word. phpdocx offers different parsing options:
Only use it for the CSS inheritance and parse consequently its child elements.
Parse them as a "p" element with the option "parseDivs" set to "paragraph" (this may be an useful option when using HTML code coming from a WYSIWYG editor).
Parse it as a table with the option "parseDivs" set to "table". This may be the most accurate option if one may decide to preserve all available formatting but may produce complicated Word documents that may be later difficult to edit manually (if that is an interesting option).
And about tables:
Defining widths in tables
In order to correctly assign widths to tables' columns it is advisable to define the width of the table as well as its cells.
If you don't set widths to tables (table an td tags), you set automatic values that are readed correctly by MS Word but not other DOCX readers, so it's recommended applying widths to tables when adding them.
phpdocx includes options and support contents/styles to get the same output in all DOCX readers and return the best transformation and output. To understand how to use the library properly, we recommend you to read the available documentation.