Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
CSS Reference
Attributes
Font and Text
 layoutGridType Property
-ms-layout-grid-type Attribute | layoutGridType Property

Sets or retrieves the type of grid used for rendering the text content of an element.

Syntax

HTML { -ms-layout-grid-type : sType }
Scripting[ sType = ] object.style.layoutGridType

Possible Values

sTypeString that specifies or receives one of the following values.
loose
Default. Grid used for Japanese and Korean characters. In this mode, a constant width increment is applied to characters as follows: Wide characters and narrow kana characters are incremented to obtain an exact grid fit, as specified by the layoutGridChar property. Other narrow characters, except connected and cursive characters, are incremented by half of the increment amount applied to wide characters. Other characters, including connected and cursive characters, are not incremented, and behave as if no character grid is set.
strict
Grid used for Chinese, as well as Japanese (Genko) and Korean characters. Only the ideographs, kanas, and wide characters are snapped to the grid. Other characters are rendered as usual, as though the -ms-layout-grid-mode attribute is set to none or line for text spans containing these characters. This mode also disables special text justification and character width adjustments normally applied to the element. Finally, if there is no line-break opportunity in a text span that exceeds the line boundary, the text is pushed to the next line and the last part of the previous line is left blank.
fixed
Grid used for monospaced layout. The layout rules are as follows: All noncursive characters are treated as equal; every character is centered within a single grid space by default. Runs of cursive characters are treated as strips the same as in a strict grid. Justification or any other character-width changing behaviors are disabled.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of loose. The Cascading Style Sheets (CSS) attribute is inherited.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are not supported in IE8 mode. For more information, see About Dynamic Properties.

Remarks

 New for Windows Internet Explorer 8 Internet Explorer 8. The -ms-layout-grid-type attribute is an extension to CSS, and can be be used as a synonym for layout-grid-type in IE8 mode.

Web documents in Asian languages, such as Chinese or Japanese, usually create a page layout for characters using a one- or two-dimensional grid. You can use the -ms-layout-grid attribute to incorporate this layout into Web documents.

The -ms-layout-grid-type attribute applies only to block-level elements.

Example

This example uses the -ms-layout-grid-type attribute to specify character layout for a block of text.

<STYLE>
DIV.layout { layout-grid-type: strict }
</STYLE>

<DIV CLASS = "layout">
This is a block element containing a sentence of sample text.
</DIV>

Standards Information

This property is defined in Cascading Style Sheets (CSS), Level 3 (CSS3) World Wide Web link.

Applies To

BLOCKQUOTE, BODY, CENTER, currentStyle, DD, DIR, DIV, DL, DT, FIELDSET, FORM, hn, HR, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, style, TABLE, TD, TH, TR, UL, XMP, CSSCurrentStyleDeclaration Constructor, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker