We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text-align:center not working in DIV

I am trying to create word doc using html but word doc text alignment not comming correctly…

its very urgent please help me…

HTML :
<div style=“font-size: 14pt; font-family: Times; font-weight: bold; text-align: center;”>
Apples for Bear

<td style=“font-size: 12pt; font-family: Times; font-weight: normal; vertical-align: top;
width: .25in;”>
1
One day, Bear decided what he wanted most was an apple. He went off to the forest
to find an apple tree. Before long, Bear found a tree with so many apples on it
he decided he wanted to gather a pile of apples. There was one problem. The apples
were at the top of the tree. Poor Bear jumped as high as he could, but he could
not reach the apples. Then he dragged over a big log and climbed up on it. He still
was not high enough to get even one sweet apple! Bear sat down. He felt very sorry
for himself. He saw a stick lying on the ground. It was very long and had a nice
point on each end. It was perfect for getting apples down from the tree. He had
just picked up the stick when suddenly a beaver came up behind him.
<td style=“font-size: 12pt; font-family: Times; font-weight: normal; vertical-align: top;
width: .25in;”>
2
“Give me my stick!” said Beaver. “I need it to build my dam!”
<td style=“font-size: 12pt; font-family: Times; font-weight: normal; vertical-align: top;
width: .25in;”>
3
“No! I need it to get apples down from this tree,” said Bear.
<td style=“font-size: 12pt; font-family: Times; font-weight: normal; vertical-align: top;
width: .25in;”>
4
Beaver was about to get grumpy when he stopped to think. Then Beaver smiled and
said, “I will lend you my stick if you will get some sweet apples for me too.”
So Bear knocked down a bunch of apples for them to share. From that time on, Beaver
and Bear got along just fine.

Hello

Thanks for your request. On this case you should use the following HTML construction:

<div style="font-size: 14pt; font-family: Times; font-weight: bold;">

<span style="font-size: 14pt; font-family: Times; font-weight: bold;">

<center>Apples for Bear</center> <br /><br />

</span>

</div>

Best regards,

Firstly thanks for quick response...

I have thousands of HTML files and i have to convert them to Word Doc, in this case your solution is not fesiable ... have you any other work around for me

Thanks in Advance

Hello

Thanks for your request. The problem occurs because, currently, Aspose.Words does not support inheriting styles from parent elements.

Currently, Aspose.Words expects that font formatting is set in element, formatting of paragraph – in

or

elements etc…

I linked your request to the appropriate issue, you will be notified as soon as it is resolved.

Best regards,

The issues you have found earlier (filed as WORDSNET-2021) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(17)