Knowledge Base

PUB98: Problems Aligning Graphics to Text When Viewing Web Page

Article ID: 179536

Article Last Modified on 11/10/1999


APPLIES TO


This article was previously published under Q179536

SYMPTOMS

If you vertically align a picture frame with a line of text inside a text frame, and then preview your publication as a Web page, the picture may not line up precisely.

This problem is more pronounced if your text frame contains empty lines, or if you have customized the line spacing inside the text frame. Pictures aligned with text at the bottom of a text frame show this symptom more than pictures aligned with text near the top of a text frame.

CAUSE

When you convert your publication to HyperText Markup Language (HTML), Publisher accurately converts the size and placement of the text frame to a cell in an HTML table. However, the precise placement of text within that cell is determined by your Web browser, not by Publisher. Some factors that contribute to this behavior are:
  • Publisher uses the HTML break (<br>) tag to start a new line. Some Web browsers ignore this tag when it appears on a line by itself.
  • The Web browser interprets how much space to show between lines of text.
  • While you can use HTML code to specify the typeface and font size used to format your text, HTML does not actually include the font. If a specific font is not installed on your computer, the Web browser substitutes another font.

WORKAROUND

To make a picture appear level with a certain line of text, use several text frames instead of one text frame. Start a new text frame for each line of text you want to line up precisely with the picture.

NOTE: If you overlap a picture frame and a text frame, or apply a BorderArt design to your text frame, that frame will be converted to a picture when you convert your file to HTML. While this also assures your picture is aligned correctly with your text, it causes your Web page to download more slowly.

MORE INFORMATION

This behavior is not a problem with Microsoft Publisher. It is caused by a limitation in HTML. You may encounter similar issues creating Web pages in any HTML authoring program.

Additional query words: 98 pub98 mspub98 pub_98 5.00 publisher98 pub5 ms_pub98 mspub

Keywords: kbprb kbhtml KB179536