How do i preserve css styling when opening an html file in word?

D

dj

I have an html file which has some basic styling - style="float:right". When
I open this file up in word, word ignores the styles. How do i get word to
use the style.

What I am trying to achieve is to create an html page where some text
appears on the right of the page and this is preserved when opening the page
in word. The html page has to drive this behaviour as I can't modify any word
settings.
 
B

Bob Buckland ?:-\)

Hi D.J.,

This article lists some of the limitations of page layout via HTML in Word
http://support.microsoft.com/kb/212270

You won't be able to 'float' text for positioning without it being supported in a frame or shape or table, Word isn't page layout
software, but Word can justify text right in a paragraph or wrap it around a picture. 'Float', if you're referring to a top level
CSS class is one of the CSS elements that Word doesn't support. Word is supposed to ignore the elements it does not support.

Without having a link to the web page to view, not knowing the version of Word you're using, or if you're using embedded CSS, or an
attached CSS sheet, what you may want to try is creating a page in Word the way you want it to look while you're in Web Layout view,
and then use File=>Web Page Preview (if pre Word 2007) to open the page in the browser and then in your browser right click and use
View=>Source to see how word positioned the graphic, then mimic that CSS in the creation of the HTML page.

===============
I have an html file which has some basic styling - style="float:right". When
I open this file up in word, word ignores the styles. How do i get word to
use the style.

What I am trying to achieve is to create an html page where some text
appears on the right of the page and this is preserved when opening the page
in word. The html page has to drive this behaviour as I can't modify any word
settings.>>
--

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*
 
D

dj

Hi Bob,

Thanks for your reply. I am going to try this out on Monday when I'm back at
work.
 

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