3 <body style=
"font-family: Ahem; -webkit-font-smoothing: none;">
5 div.table { display: table; }
6 div.section { display: table-row-group; }
7 div.cell { display: table-cell; width:
50px; height:
50px; background-color: blue; }
8 div.row { display: table-row; }
9 div.test { background-color: green; width:
50px; height:
50px; }
12 <div class=
"table" id=
"table-1">
13 <div class=
"section" id=
"tbody-1">
14 <div class=
"row" id=
"row-1">
15 <div class=
"cell" id=
"cell-1"></div>
16 <div class=
"cell" id=
"cell-2"></div>
24 var divElement
= document
.createElement("div");
25 divElement
.setAttribute("class", "test");
29 function insertDiv(tableID
, beforeID
)
31 var tableRow
= document
.getElementById(tableID
);
32 var before
= document
.getElementById(beforeID
);
33 tableRow
.insertBefore(createDiv(), before
);
36 document
.body
.offsetTop
;
38 insertDiv("row-1", "cell-2");