Microsoft KB Archive/324235

= How to align tables in Microsoft FrontPage for cross-browser compatibility =

Article ID: 324235

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft FrontPage 2002 Standard Edition
 * Microsoft Office FrontPage 2003

-



This article was previously published under Q324235



SUMMARY
Microsoft FrontPage uses DIV tags in the HTML code that it generates to center tables on a Web page. While this method works with the Microsoft Internet Explorer Web browser, this method of formatting may not be supported by other Web browsers. This article contains methods that may be supported by Web browsers other than Microsoft Internet Explorer.



MORE INFORMATION
For better browser compatibility, Microsoft recommends that Web authors use one of the following methods.

Use the CENTER tag in HTML
To center a table by using the CENTER tag in HTML, the table must be placed inside a set of  tags--for example:  

Use the ALIGN attribute of the TABLE tag in HTML
To center a table by using the ALIGN attribute of the TABLE tag in HTML, the opening tag for the table must have the ALIGN attribute added--for example:

Use cascading style sheets
To create a centered table by using cascading style sheets, a table class must be used and both the left and the right margins must be equal. To do this, both the left and the right margins must be set to &quot;auto&quot;--for example:

table {  margin-left: auto; margin-right: auto; }

This style will center all the tables on the page, when placed in the section of the HTML page.

Note Microsoft Internet Explorer 6.0 accommodates two settings per page for strict and loose HTML compliance. By default all pages have loose settings. Therefore, this style will be ignored. To force Internet Explorer to follow strict HTML specifications and respect the table style, the following doctype declaration must be placed outside the  tags of the page: <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Strict//EN&quot;> For more information about HTML formatting, visit the following World Wide Web Consortium (W3C) Web site:

http://www.w3.org

Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

Additional query words: inf

Keywords: kbhowto KB324235

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.