Word doesnot recognize div style attributes in html file

  • Thread starter Ram Kumar Karnataka
  • Start date
R

Ram Kumar Karnataka

Hi,
I have a html file which looks like as shown in below:

<html>
<div style="width: 247px; height: 12px; position: absolute; left: 300px;
top: 10px;"><span style="color: #ff3333"><strong>filtered outside air
temperature</strong></span></div>
</html>


This html file when open in a web browser, is showing up correctly with the
text positioned to left 300px.

But the same html file when inserted into MS Word or opened using word, the
applied position info is not correct. Its by default coming at the beginning
of the line.

Can anyone please help me in this regard?


Thanks


Regards
 
J

Jean-Guy Marcil

Ram Kumar Karnataka said:
Hi,
I have a html file which looks like as shown in below:

<html>
<div style="width: 247px; height: 12px; position: absolute; left: 300px;
top: 10px;"><span style="color: #ff3333"><strong>filtered outside air
temperature</strong></span></div>
</html>


This html file when open in a web browser, is showing up correctly with the
text positioned to left 300px.

But the same html file when inserted into MS Word or opened using word, the
applied position info is not correct. Its by default coming at the beginning
of the line.

This is group is about programming in Word with VBA, not HTML.
I guess you could have posted in Page Layout or Graphics...

Anyway, make sure you are working with the Wwb view in Word (View menu).

But really, Word is atrocious as a serious Web/HTML page editor. You should
use a real Web page editor. The official one from Microsoft is Frontpage.
There is a FrontPage group where you could ask questions (if you are using
Frontpage, not Word).
Also, there are thousands of free/shareware Web/HTML editors... You could go
to tucows.com to search for one.
 
F

fumei via OfficeKB.com

I am SO with Jean-Guy on this. Using Word for HTML editing is simply a bad
idea. I wish they would get rid of it, and let Word do what it does well -
be a word processor. As mentioned, there are lots and lots of decent to
excellent HTML editors out there, many free. Use the right tool for the
right job. Word is not the right tool for HTML.

Although I would have to say that IMO FrontPage is only marginally better.

Jean-Guy Marcil said:
Hi,
I have a html file which looks like as shown in below:
[quoted text clipped - 11 lines]
applied position info is not correct. Its by default coming at the beginning
of the line.

This is group is about programming in Word with VBA, not HTML.
I guess you could have posted in Page Layout or Graphics...

Anyway, make sure you are working with the Wwb view in Word (View menu).

But really, Word is atrocious as a serious Web/HTML page editor. You should
use a real Web page editor. The official one from Microsoft is Frontpage.
There is a FrontPage group where you could ask questions (if you are using
Frontpage, not Word).
Also, there are thousands of free/shareware Web/HTML editors... You could go
to tucows.com to search for one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top