layout-grid-line property
Specifies the gridline value used for rendering the text content of an element.
![]() |
Syntax
layout-grid-line: none | auto |
<length>
Property values
none-
Default. No grid line 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, orpc) or a relative units designator (em,ex, orpx). 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 To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value |
Standards information
There are no standards that apply here.
Remarks
Microsoft Edge supports the unprefixed version (layout-grid-line) of this property.
The visual effects of the layout-grid-line 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-line attribute applies only to block-level elements.
Examples
This example uses the layout-grid-line attribute to specify character layout for a block of text.
<style> .layout { layout-grid-line: auto; } </style> <div class="layout"> This is a block element containing a sentence of sample text. </div>
See also
