layoutGridChar style property
Specifies or returns the size of the character grid for the layout of an element's text content.
This property has effect only if the layoutGridMode property is set to line or both, and only applies to block elements.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: layout-grid-char |
Possible values:
The type of this property is string.
One of the following values:
Character grid is to be dependent on the largest character. | |||||||
Default. Character grid is not used. | |||||||
The size of the character grid in length units. For the supported length units, see the length page. | |||||||
The size is the specified percentage of the height of parent element. |
Default: none.
Example HTML code 1:
This example illustrates the use of the layout-grid-char property:
|
||||
<head> <style> .example { layout-grid-char: 15px; } </style> </head> <body> <div class="example">layout-grid-char: 15px</div> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the layoutGridChar property in JavaScript:
|
||||
<head> <script type="text/javascript"> function ChangeLayout (selectTag) { // Returns the index of the selected option var whichSelected = selectTag.selectedIndex; // Returns the selected options values var layoutValue = selectTag.options[whichSelected].text; var div = document.getElementById ("myDiv"); if ('layoutGridChar' in div.style) { div.style.layoutGridChar = layoutValue; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <div id="myDiv">Change the value of the layout-grid-char property</div> <br /> <select onchange="ChangeLayout (this);" size="7"> <option />5px <option />10px <option />15px <option />30px <option />45px <option />auto <option selected="selected" />none </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
imeMode
layoutFlow
layoutGrid
layoutGridLine
layoutGridMode
layoutGridType
rubyAlign
rubyOverhang
rubyPosition
textJustify
textKashidaSpace
unicodeBidi
layoutFlow
layoutGrid
layoutGridLine
layoutGridMode
layoutGridType
rubyAlign
rubyOverhang
rubyPosition
textJustify
textKashidaSpace
unicodeBidi
External links:
User Contributed Comments