4 .lr { -webkit-writing-mode: vertical-lr; background-color:green; margin-left:auto; margin-right:auto; width:
100px; height:
100px; }
8 The green LR block should be centered horizontally within the black-bordered block.
9 <div style=
"width:300px; height:100px;border:2px solid black">
10 <div class=
"lr" id=
"test"></div>
12 <div id=
"console"></div>
14 if (window
.testRunner
)
15 window
.testRunner
.dumpAsText();
16 test
= document
.getElementById("test");
17 rect
= test
.getBoundingClientRect();
18 if (rect
.left
!= 110) {
19 document
.getElementById('console').innerHTML
= "FAIL: The block should be at an x-offset of 100.";
20 test
.style
.backgroundColor
= 'red';
22 document
.getElementById('console').innerHTML
= "PASS: The block is in the correct position.";