Posted By

johnloy on 04/16/09


Tagged

css javascript textmate typography


Versions (?)

detect a browser's font-size using javascript


 / Published in: Other
 

  1. var measure= document.createElement('div');
  2. measure.style.height= '10em';
  3. document.body.appendChild(measure);
  4. var size= measure.offsetHeight/10;
  5. document.body.removeChild(measure);

Report this snippet  

You need to login to post a comment.