writingMode property
[This documentation is preliminary and is subject to change.]
Sets or retrieves the direction and flow of the content in the object.
Syntax
HRESULT value = object.put_writingMode(BSTR v);HRESULT value = object.get_writingMode(BSTR* p);
Property values
Type: BSTR
lr-tb (lr-tb)
Default. Content flows horizontally from left to right, top to bottom. The next horizontal line is positioned underneath the previous line. All glyphs are positioned upright. This layout is used by most writing systems.
rl-tb (rl-tb)
Content flows horizontally from right to left, top to bottom. The next horizontal line is positioned underneath the previous line. All glyphs are positioned upright. This layout is used with right-to-left scripts like Arabic, Hebrew, Thaana, and Syriac.
tb-rl (tb-rl)
Content flows vertically from top to bottom, right to left. The next vertical line is positioned to the left of the previous line. Wide-cell glyphs are positioned upright; nonwide-cell glyphs (also known as narrow Latin or narrow Kana glyphs) are rotated 90° clockwise. This layout is used in East Asian typography.
bt-rl (bt-rl)
Content flows vertically from bottom to top, right to left. The next vertical line is positioned to the left of the previous line. Wide-cell glyphs are positioned upright; nonwide-cell glyphs (also known as narrow Latin or narrow Kana glyphs) are rotated 90° clockwise. This layout is used for right-to-left script blocks used in vertical East Asian typography.
(tb-lr)
Internet Explorer 8. Content flows vertically from top to bottom, left to right. The next vertical line is positioned to the right of the previous line.
(bt-lr)
Internet Explorer 8. Content flows vertically from bottom to top, left to right.
(lr-bt)
Internet Explorer 8. Content flows horizontally from bottom to top, left to right. The next horizontal line is positioned above the previous line.
(rl-bt)
Internet Explorer 8. Content flows horizontally from bottom to top, right to left.
(lr)
Internet Explorer 9. For use on SVG and HTML elements. Equivalent to lr-tb.
(rl)
Internet Explorer 9. For use on SVG and HTML elements. Equivalent to rl-tb.
(tb)
Internet Explorer 9. For use on SVG and HTML elements. Equivalent to tb-rl.
String format
lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb
CSS information
Applies To | All elements |
Media | visual |
Inherited | true |
Initial Value |
Remarks
The following diagram shows how the different values for the property appear on the screen.
Internet Explorer 8. The -ms-writing-mode attribute is an extension to CSS and can be used as a synonym for writing-mode in IE8 Standards mode.
The property does not accumulate. That is, even if the -ms-writing-mode property, set to the same value, is applied to an object multiple times, the -ms-writing-mode property is effectively applied to the object only one time. For example, if a parent element has the -ms-writing-mode property set to tb-rl, setting a child element's -ms-writing-mode property to tb-rl does not cause the child element to double the effect of the -ms-writing-mode property, or "rotate."
An element has its own layout if the value for the -ms-writing-mode property is different than its parent. When a change in layout flow is specified for a child element, the maximum logical height requirement (height in this element's coordinate system) is determined by the available space (width measurement) in the parent's coordinate system. Based on this information, a logical width (width in the child's coordinate system) is computed to meet the maximum logical height requirement. Depending on the amount of space needed by the child element, the actual logical height of the element can be less than the maximum logical height requirement.
When you use elements that have different values for the -ms-writing-mode property, you can have greater control over the layout of those elements by specifying fixed dimensions for each element.
Windows Internet Explorer 7. The rl-tb, and bt-rl values are available to the -ms-writing-mode.
Internet Explorer 7. The -ms-writing-mode for the body element is limited to lr-tb and rl-tb.
Internet Explorer 8. Because -ms-writing-mode is currently defined by the World Wide Web Consortium (W3C) in a draft specification, -ms-writing-mode is preferred for style sheet validation, as in the following code example.
.clsHorizLR { -ms-writing-mode:lr-tb }
.clsHorizRL { -ms-writing-mode:rl-tb }
.clsVertTB { -ms-writing-mode:tb-rl }
.clsVertBT { -ms-writing-mode:bt-rl }
Requirements
Minimum supported client |
Windows XP |
Minimum supported server |
Windows 2000 Server |
Header |
Mshtml.h |
IDL |
Mshtml.idl |
DLL |
Mshtml.dll |
Build date: 1/23/2012