Free Support Forum -

Render CSS Border Styles around DIV within a DIV during HTML to Word DOCX Document Conversion using C# .NET

Good Afternoon,

We currently are using Aspose.Word version 19.7 and having issues were css borders in style classes are not rendered properly in div with child div tags. The perimeter of the border does not expand around the whole outer div

Here is the HTML

Tests Requested:

Here is the CSS classes
border-style: solid;
border-color: black;
padding: 15px;
margin: 1px;
width: 100%;

.header2 {
font-family: Calibri, Arial, sans-serif;
font-size: 12pt;
letter-spacing: 1px;
font-weight: bold;
color: #000000;


Thank you for help

test test test test test
testr testr testr testr testr
testr testr testr testr testr


Are you converting HTML file (or string) to Word formats such as DOCX, DOC , RTF etc?

Please ZIP and attach the following resources here for testing:

  • Your simplified HTML file containing the CSS
  • Aspose.Words 20.7 generated output Word file showing the undesired behavior
  • Your expected file showing the desired output. You can create expected file by using MS Word or any other editor.

As soon as you get these pieces of information ready, we will start investigation into your scenario and provide you more information.

Thank you for your reply, Attached in the .zip file is the html, css, generated word doc, and the .png of the desired (40.8 KB)
s. Just to note we are using Aspose 19.7


While using the latest 20.7 version of Aspose.Words for .NET, we have managed to reproduce this issue on our end. We have logged this issue in our bug tracking system with ID WORDSNET-20805. Your thread has also been linked to this issue and you will be notified as soon as it will get resolved. Sorry for the inconvenience.

Good Morning,

Did your team find a resolution to this issue?



WORDSNET-20805 is currently pending for analysis and is in the queue. We will inform you via this forum thread as soon as this issue will get resolved in future or any more updates may be available. We apologize for any inconvenience.