 <p>May be you're missing "px" at the end:</p> <pre><code>function resizeText(multiplier) { var elements = document.getElementsByClassName('Resizable'); for(var i = 0; i &lt; elements.length; i++) { elements[i].style.fontSize = parseFloat(elements[i].style.fontSize) + (multiplier + * 0.2) + "px"; } } </code></pre>