HTML to docx – div and children element

Home Forums Open-Xml-PowerTools HTML to docx – div and children element

This topic contains 1 reply, has 1 voice, and was last updated by  PB 7 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3963

    PB
    Participant

    My test html looks like this:

    
    <html>
    <HEAD>
    <TITLE>wrapper div test</TITLE>
    <style type="text/css">
    </style>
    </HEAD>
    <body>
    <div style='border-bottom:solid black 0.5pt;'> No Empty </div>
    <h3 style='border-bottom:solid blue 0.6pt; background:#dfdfed;'>paragraph</h3>
    <div style='border:solid black 0.5pt;display:block;background:#dfdfed;'>
    <ul>
    <li>li 1</li>
    <li style="float:right;">li 2</li>
    <li style='border:solid black 0.5pt;'>li 3</li>
    <li style="float:right;">li 4</li>
    </ul></div></body></html>

    I realized when I convert this html to docx, Div element after H3 has no effect. I am expecting a border around bulleted list but it doesn’t show up. Other borders show up as expected.

    Please suggest how can I fix this or get around it. Is it even possible to have a wrapper element without using a table?

    #3966

    PB
    Participant

    Just to add, I created the html page using wmltohtml converter. I created a heading in word with background. When the word doc is coverted to html, the backgroud is preserved; but not when I convert the generated html to word.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.