Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a sample:

    <title>word test</title>
    <div style='position: absolute; width: 30px; height: 50px; top: 100px; left: 20px; border-color: black; border-width: 1px; border-style: solid;'>

Save it as "word.doc" and open in MS WORD.

Absolute position don't work!

Div is rendered on the top of document and with 100% width. Why? I can't use a html tables.

Version on ms word: 2003

share|improve this question

migrated from May 28 '10 at 18:47

This question came from our site for professional and enthusiast programmers.

Office 2007 - burden of my life (especially Outlook 2k7!) – Barrie Reader May 27 '10 at 9:11
Why are you using HTML to generate a Word document? Office and HTML are like fire and ice. – RoToRa May 27 '10 at 9:48

You can find a full list of Word 2007's supported CSS here:

Yes, it's shockingly poor but would you expect anything else from Microsoft's Office team?

Here's a quick reference list of CSS2 that you can't use:

  • azimuth
  • background-attachment
  • background-image
  • background-position
  • background-repeat
  • border-spacing
  • bottom
  • caption-side
  • clear
  • clip
  • content
  • counter-increment
  • counter-reset
  • cue-before, cue-after, cue
  • cursor
  • display
  • elevation
  • empty-cells
  • float
  • font-size-adjust
  • font-stretch
  • left
  • line-break
  • list-style-image
  • list-style-position
  • marker-offset
  • max-height
  • max-width
  • min-height
  • min-width
  • orphans
  • outline
  • outline-color
  • outline-style
  • outline-width
  • overflow
  • overflow-x
  • overflow-y
  • pause-before, pause-after, pause
  • pitch
  • pitch-range
  • play-during
  • position
  • quotes
  • richness
  • right
  • speak
  • speak-header
  • speak-numeral
  • speak-punctuation
  • speech-rate
  • stress
  • table-layout
  • text-shadow
  • text-transform
  • top
  • unicode-bidi
  • visibility
  • voice-family
  • volume
  • widows
  • word-spacing
  • z-index
share|improve this answer
Very nice. Never knew this existed. – zedfoxus Aug 6 '13 at 16:32

Probably because Microsoft Word uses its own renderer which sucks.

An article from 2007 says...

No support for float or position

(this should apply to you because your version is 2003)

So you are out of luck. Unfortunately, table based layouts are still common in HTML emails because of this reason.

share|improve this answer
Ok. I have collection of blocks. I know x, y, width, height of each block. Can I convert it to table design? Blocks don't has children. – Tim May 27 '10 at 9:13

Ok, I had the same problem. What I did is to format my html document in word and saved it. Then I striped down the markup to what I actually really needed. You need to include the vml namespace to your html doc (xmlns:v="urn:schemas-microsoft-com:vml")

<html xmlns:v="urn:schemas-microsoft-com:vml">

Then you need the following code, choose the id how ever you want, you can also choose the position of the image more or less free. The image is in front of the text.

<!--[if gte vml 1]><v:shape id="Bild_x0020_1" type="#_x0000_t75"
<v:imagedata src=""/>

Although I'm not sure if this works for Word 2003, my Version is 2010.

share|improve this answer

You must log in to answer this question.