<!DOCTYPE>
<html style="font: 1em/1 Ahem, sans-serif;">
<style type="text/css">
.c1 { display: inline-table; color: blue}
.c1:before { overflow: hidden; content: counter(section); color: red}
.c1:nth-child(2n) { text-decoration: overline; }
</style>
<body>
<div class="c1" id="div1"><q style="display:inline-table"></q></div>
</body>
<script>
    function runTest() {
        document.getElementById('div1').setAttribute('class', 'c1');
        document.body.offsetTop;
    }
    window.onload = runTest;
</script>
</html>
