Layout Meta Tag

4/8/2010

The Internet Explorer Mobile default layout fits the page content to the Windows Mobile device screen. The Internet Explorer Mobile default fit-to-screen layout can be changed. Windows Mobile Standard has a Layout menu that enables users to select the Internet Explorer Mobile layout they want.

The following table shows the Layout menu options.

Selection Description

Default

Narrows content width to reduce horizontal scrolls.

One Column

Forces all content to fit in a single column with no horizontal scrolling.

Desktop

Makes no change to the content. Rendering for Internet Explorer Mobile is as close as possible to the rendering for Windows Internet Explorer on a Windows-based desktop platform.

Note

Web developers can only force a layout selection for their own pages.

Web developers use the MOBILEOPTIMIZED meta tag to control the Internet Explorer Mobile layout. Setting the MOBILEOPTIMIZED meta tag is equivalent to the Layout menu Desktop selection. When the MOBILEOPTIMIZED meta tag is set Internet Explorer Mobile does not modify the layout at all for the page containing the meta tag.

With the meta tag, the screen width, minus margins, and scrollbars, is used to determine the width for rendering with fit-to-screen off.

Note

The default width for the body when fit-to-screen is off is 640 pixels.

The following meta tag indicates that the page should be rendered as if fit-to-screen were turned off.

<meta name="MobileOptimized" content="width">

In the tag, the nominal width is a number that indicates what screen size the Web site was developed for. If this size is less than or equal to the screen width, fit-to-screen will be turned off. If it is larger, fit-to-screen will remain on. This means that Internet Explorer Mobile will use the default layout.

Examples of sizes that might be used for Windows Mobile devices are:

Screen Size Platform

content="176"

Windows Mobile Standard

content="240"

Windows Mobile Professional and Windows Mobile Classic 

content="480"

Windows Mobile Professional and Windows Mobile Classic (high DPI)

The suggested default setting is that of Windows Mobile Professional and Windows Mobile Classic or 240 pixels.

See Also

Concepts

Internet Explorer Mobile Font Scaling

Other Resources

Internet Explorer Mobile High DPI
Mobile Web Site Design Overview