Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="UTF-8">
5 <title>dir() selector</title>
6 <style>
7 :-moz-dir(ltr) { color: blue }
8 :-moz-dir(rtl) { color: lime }
9 div { text-align: left; }
10 </style>
11 <script type="text/javascript">
12 function AppendElementWithChild() {
13 var x = document.createElement("span");
14 x.innerHTML = "This span should inherit rtl from the parent. ";
16 var y = document.createElement("span");
17 y.innerHTML = "This span should inherit rtl from the grandparent.";
19 var z = document.getElementById("z");
21 x.appendChild(y);
22 z.appendChild(x);
23 }
24 </script>
25 </head>
26 <body onload="AppendElementWithChild()">
27 <div id="z" dir="rtl">This element is rtl. </div>
28 </body>
29 </html>