I have a font size switcher that changes the font size. Works great with all browsers except IE 7 and 6. In IE, when you click the larger link, the font size of the div in question balloons to 960px.
Has anyone else experienced this? Where do I learn how IE declares the font-size? Any help would be much appreciated. This is driving me crazy. Here is the JS... $('.fontChanger').click(function() { var theElement = $('#pageContent').css('font-size'); //Get the font size alert(theElement); var textSize = parseFloat(theElement, 10); //Gimme just the number in base 10 //alert(textSize); var unitOfMeasure = theElement.slice(-2); //Find out what the unit of measurement is px, em, or % and use that //alert(unitOfMeasure); if ((this).id == 'fontLarger') { textSize += 2; //alert(textSize); } else { textSize -= 2; //alert(textSize); }; $('#pageContent').css('font-size', textSize + unitOfMeasure); //alert(textSize + unitOfMeasure); return false; });