Replies: 1   Views: 2034
Odd behavior with embedhtml and ul
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 lucaloda  · 27-11-2018 - 14:13

if i insert an <ul> inside a <td> which has a background, the <ul> dots will have a colour as background that changes with the colour of the <td> background

Posted by admin  · 27-11-2018 - 15:00


Some CSS styles are inherited. We recommend you to set explicit styles to overwrite inherited styles.

We have also run the following code:

$html = '<table border="1" style="border-collapse: collapse" width="600">
                <tr width="600">
                    <td style="background-color: yellow"><ul><li>Item A</li><li>Item B</li></ul></td>
                    <td rowspan="3" colspan="2">1_2</td>
                <tr width="600">
                    <td>Some random text.</td>
                <tr width="600">
                            <li>Two <b>and a half</b></li>
                <tr width="600">

that includes a cell with a background and a list and the output is correct. We have tested the output with all versions of MS Word and LibreOffice; please note that OpenOffice has limitations when opening DOCX documents.