WD2000: Left-Aligned Table in an HTML Document Displays As Right-Aligned in Netscape (209598)



The information in this article applies to:

  • Microsoft Word 2000

This article was previously published under Q209598

SYMPTOMS

When you create an HTML document in Microsoft Word, tables that are left-aligned may appear right-aligned when you view them in the Netscape Navigator 4.0 browser.

CAUSE

This behavior can occur when Word uses cascading style sheet (CSS) settings for a left-aligned table, as in the following example
   <p>Hello</p> 
   <table border style='margin-left:1in; color: red'>
   <tr><td> 
   <table border><tr><td width=223>nested table</td></tr></table>
   </td></tr>
   </table> 
   <p>Hello</p>
				
because Netscape Navigator 4.0 does not function as expected with left-aligned tables.

WORKAROUND

To resolve this issue, upgrade to Netscape Navigator 4.5 or later.

To work around this issue, place a DIV tag around any table element that needs to have a margin-left/right CSS setting written out on it, and move that margin-left/right setting to the section of HTML containing the DIV tags, as in the following example:
   <p>Hello</p> 
   <div style='margin-left:1in; color: red'>
   <table border>
   <tr><td>
   <table border><tr><td width=223>nested table</td></tr></table>
   </td></tr>
   </table>
   </div> 
   <p>Hello</p>
				
NOTE: This workaround does not work with nested tables, as in the following example:
   <p>Hello</p> 
   <div style='margin-left:1in; color: red'>
   <table border>
   <tr><td>
   <div style='margin-left:1in'>
   <table border><tr><td width=223>nested table</td></tr></table>
   </div>
   </td></tr>
   </table>
   </div> 
   <p>Hello</p>
				

Modification Type:MajorLast Reviewed:12/6/2000
Keywords:kbprb KB209598