blob: 3eba78d8ecfea5c3ea8528b7babab146ebd7e4be [file] [log] [blame]
<div style="width: 60px; height: 40px; position: relative;">
<div style="width: 20px; height: 40px; background-color: red; margin-left: 20px;"></div>
<div id="target" style="position: absolute; top: 0; left: 0; font-family: Ahem; font-size: 20px; color: green;">
X X
</div>
</div>
<script>
document.body.offsetTop;
document.getElementById("target").style.left = "20px";
</script>