asp.net.ph

Skip Navigation Links

layout-grid-char Attribute | layoutGridChar Property

CSS Attributes Index   Box Attributes


Sets or retrieves the size of the character grid to use for rendering the text contents of an element.

Syntax


CSS { layout-grid-char: 'auto' | iLength | iPercent}
Script [ 'auto' | iLength | iPercent = ] oObject.style.layoutGridChar

Possible Values


auto String specifying the grid is determined by the largest character in the font of the element.
iLength Floating-point number and a valid CSS length unit: either an absolute units designator ( cm, mm, in, pt, pc, or px ) or a relative units designator ( em or ex ).
iPercent Percentile derived from the dimensions of the parent.

The property is read/write with no default value; the proposed cascading stylesheet ( CSS ) extension attribute is inherited.

Remarks

The visual effects of the layout-grid-char attribute are somewhat akin to the lineHeight property.

Characters in East Asian languages, such as Chinese or Japanese, commonly use page layout for characters according to a one- or two-dimensional grid.

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

Note In order for this property to have an effect, the layout-grid-mode attribute must be set to line or both.

Example

The following sample demonstrates the use of the layout-grid-char attribute to specify character layout for a block of text.

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

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


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note