Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Firefox, Chrome and Safari all have a zoom function (C-+ and C--) which is really nice. But is there a way to find out what is the generated font-size after the zoom?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

In Firefox, I would just install the NoSquint extension, which (in addition to its other features) can display the current zoom level in the status bar.

share|improve this answer
    
Thanks a lot, that did the trick. –  Aziz Light Aug 25 '10 at 7:14
add comment

Here is a little dirty trick as copied from: http://www.webdeveloper.com/forum/showthread.php?t=170413

document.emSize=function(pa){
    pa= pa || document.body;
    var who= document.createElement('div');
    var atts= {fontSize:'1em',padding:'0',position:'absolute',lineHeight:'1',visibility:'hidden'};
    for(var p in atts){
        who.style[p]= atts[p];
    }
    who.appendChild(document.createTextNode('M'));
    pa.appendChild(who);
    var fs= [who.offsetWidth,who.offsetHeight];
    pa.removeChild(who);
    return fs;
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.