- facing the issue with aspose word , it is ignoring style applied to table td .
- style width is not applied to the table td.
Below is html code , when tried to load it word document and save it aspose word ignoring the styles applied to the table tr td., e.g. width:100px applied to td.
<!DOCTYPE html>
<head>
<style>
table {
box-sizing: inherit;
white-space: inherit;
line-height: inherit;
font-weight: inherit;
font-size: inherit;
color: inherit;
font-style: inherit;
text-align: inherit;
font-variant: inherit;
border-collapse: collapse;
empty-cells: show;
max-width: 100% !important;
layout: fixed;
}
table.fr-dashed-borders td,
table.fr-dashed-borders th {
border-style: dashed;
}
table.fr-alternate-rows tr:nth-child(2n) {
background: whitesmoke;
}
table td,
table th {
border: 0px solid black;
}
table td:empty,
table th:empty {
height: 20px;
}
table td.fr-highlighted,
table th.fr-highlighted {
border: 1px double red;
}
table td.fr-thick,
table th.fr-thick {
border-width: 2px;
}
table th {
background: #ececec;
text-align: left;
}
table td {
word-wrap: initial;
overflow: hidden;
}
table.cp-border-all-cells td {
border: 1px solid #000000 !important;
padding: 5px;
}
table.cp-border-all-cells th {
border-bottom: 1px solid #000000 !important;
}
table.cp-border-table {
border: solid 2px #000000 !important;
}
</style>
</head>
<body>
<div>
<table cellpadding=2 cellspacing=3 width="100%">
<tr>
<td style="width:15px;"> </td>
<td colspan="1">
<p style="page-break-after:avoid;">
<table class="cp-border-all-cells" style="width: 100%;">
<tbody>
<tr>
<td colspan="2" style="vertical-align: top;">first default-asd as fdds fgh fg hfghfgh fghgfhfg f fghgf fgh fghfghf hfghfghasd as fdds fgh fg hfghfgh fghgfhfg f fghgf fgh fghfghf hfghfghasd as fdds fgh fg hfghfgh fghgfhfg f fghgf fgh fghfghf hfghfghasd as fdds fgh fg hfghfgh fghgfhfg f fghgf fgh fghfghf hfghfgh <br>
</td>
</tr>
<tr>
<td style="width: 100px !important; vertical-align: top;">LAbel Text</td>
<td style="vertical-align: top;">Random text</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
</p>
</td>
</tr>
</table>
</div>
<body>
</html>