writingMode property
Specifies the direction and flow of the content in the object.
Syntax
HRESULT value = object.put_writingMode( v);HRESULT value = object.get_writingMode(* 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 | lr-tb |
Standards information
- CSS Text Level 3, Section 3.1
Remarks
Vertical writing mode was improved in IE11 edge mode in June 2014.
The following diagram shows how the different values for the property appear on the screen.
Internet Explorer 8. The IHTMLCSSStyleDeclaration::writingMode attribute is an extension to Cascading Style Sheets (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 IHTMLCSSStyleDeclaration::writingMode property, set to the same value, is applied to an object multiple times, the IHTMLCSSStyleDeclaration::writingMode property is effectively applied to the object only one time. For example, if a parent element has the IHTMLCSSStyleDeclaration::writingMode property set to "tb-rl", setting a child element's IHTMLCSSStyleDeclaration::writingMode property to "tb-rl" does not cause the child element to double the effect of the IHTMLCSSStyleDeclaration::writingMode property, or "rotate."
An element has its own layout if the value for the IHTMLCSSStyleDeclaration::writingMode 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 IHTMLCSSStyleDeclaration::writingMode 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 IHTMLCSSStyleDeclaration::writingMode.
Internet Explorer 7. The IHTMLCSSStyleDeclaration::writingMode for the body element is limited to lr-tb and rl-tb.
Internet Explorer 8. Because IHTMLCSSStyleDeclaration::writingMode is currently defined by the World Wide Web Consortium (W3C) in a draft specification, IHTMLCSSStyleDeclaration::writingMode 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 |
See also
Internet Explorer Test Drive Demos
Vertical Writing Mode Improvements
IEBlog posts