unicodeBidi style property
Specifies or returns whether the text should be overridden to support multiple languages in the same document. Use with the direction property.
This property can override the Unicode standard algorithm of the browser that determines how text should appear
when the page contains both RTL (right-to-left) and LTR (left-to-right) text.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: unicode-bidi |
Possible values:
The type of this property is string.
One of the following values:
Creates an additional level of embedding, but the reordering inside the element depends on the value of the 'direction' property. | |||||||
Creates an additional level of embedding. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Default. Does not use an additional level of embedding. |
Default: normal.
Example HTML code 1:
This example illustrates the use of the unicode-bidi property:
|
||||
<head> <style> .normal { unicode-bidi: normal; direction: rtl; } .override { unicode-bidi: bidi-override; direction: rtl; } </style> </head> <body> <p class="normal"> Unicode bidi is normal </p> <p class="override"> Unicode bidi is bidi-override </p> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the unicodeBidi property in JavaScript:
|
||||
<head> <script type="text/javascript"> function ChangeUnicodeBidi (selectTag) { // Returns the index of the selected option var whichSelected = selectTag.selectedIndex; // Returns the text of the selected option var bidiValue = selectTag.options[whichSelected].text; var div = document.getElementById ("myDiv"); if ('unicodeBidi' in div.style) { div.style.unicodeBidi = bidiValue; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <div id="myDiv" style="direction: rtl;">Change unicode-bidi!</div> <br /> <select size="3" onchange="ChangeUnicodeBidi (this);"> <option selected="selected" />normal <option />embed <option />bidi-override </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.currentStyle, htmlElement.runtimeStyle, htmlElement.style
HTML elements:
a, abbr, acronym, address, applet, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, col, colgroup, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:range, input:reset, input:search, input:submit, input:text, ins, isindex, kbd, label, legend, li, listing, marquee, menu, nobr, object, ol, optgroup, option, p, plaintext, pre, q, rt, ruby, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
Related pages:
direction
imeMode
layoutFlow
layoutGrid
layoutGridChar
layoutGridLine
layoutGridMode
layoutGridType
rubyAlign
rubyOverhang
rubyPosition
textJustify
textKashidaSpace
imeMode
layoutFlow
layoutGrid
layoutGridChar
layoutGridLine
layoutGridMode
layoutGridType
rubyAlign
rubyOverhang
rubyPosition
textJustify
textKashidaSpace
External links:
unicode-bidi (MSDN)
unicode-bidi (Mozilla Developer Center)
unicode-bidi (Safari Reference Library)
unicode-bidi (W3C)
unicode-bidi (Mozilla Developer Center)
unicode-bidi (Safari Reference Library)
unicode-bidi (W3C)
User Contributed Comments