layout-grid-char property

Specifies the size of the character grid used for rendering the text content of an element.

Internet Explorer 9

 

Syntax

layout-grid-char: none | auto | <length> | <percentage>

Property values

none

Default. No character grid is set.

auto

Largest character in the font of the element is used to set the character grid.

length

Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Values and Units Reference.

percentage

Integer, followed by a percent sign (%). The value is a percentage derived from the dimensions of the parent object.

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value

Standards information

There are no standards that apply here.

Remarks

Microsoft Edge supports the unprefixed version (layout-grid-char) of this property.

The visual effects of the layout-grid-char attribute are similar to the line-height property.

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

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

Note  For this property to have an effect, the layout-grid-mode attribute must be set to char or both.
 

Examples

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


<style>
  .layout { layout-grid-char: auto; }
</style>

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

See also

CSSStyleDeclaration
currentStyle
runtimeStyle
style

 

 

Show: