<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>
