layout-grid-type Attribute | layoutGridType Property

DHTML, HTML, & CSS

layout-grid-type Attribute | layoutGridType Property


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

Syntax

HTML{ layout-grid-type: sType }
ScriptingoObject.style.layoutGridType [ = sType ]

Possible Values

sType String that specifies one of the following values:
looseGrid used for Chinese (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 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.
strictGrid used for Japanese characters. In this mode, a constant width increment is applied to characters as follows:
  • Wide characters are incremented to obtain an exact grid fit, if no other width adjustment effect is applied.
  • Narrow characters, except cursive scripts and cursive fonts, are incremented by half of the increment amount applied to wide characters.
fixedGrid 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 way as in a strict grid.
  • Justification or any other character-width changing behaviors are disabled.

The property is read/write with a default value of loose; the proposed cascading style sheets (CSS) extension attribute is inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic propertiesInternet Link.

Remarks

Web documents in East 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 layout-grid attribute to incorporate this layout into Web documents.

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

Example

This example uses the 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>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
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

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.