asp.net.ph

Skip Navigation Links

layout-grid-char-spacing Attribute | layoutGridCharSpacing Property

CSS Attributes Index   Box Attributes


Sets or retrieves the character spacing to use for rendering the text contents of an element with the layout-grid-type attribute set to loose.

Syntax


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

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 ).

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

Remarks

The visual effects of the layout-grid-char-spacing 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-spacing 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 char or both, and the layout-grid-type attribute must be set to loose.

Example

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

<style>
DIV.layout {layout-grid-char-spacing: "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