<script src="../../resources/ahem.js"></script>
<style>
.a:first-letter { float: right; font-size: 2em; }
.b:first-letter { color: blue; }
</style>
<div id="target" style="font-family: Ahem;" class="a">Lorem ipsum dolor sit amet</div>
<script>
var target = document.getElementById("target");
target.offsetTop;
target.className = "b";
</script>