detect a browser's font-size using javascript

/ Published in: Other
Save to your folder(s)

Copy this code and paste it in your HTML
  1. var measure= document.createElement('div');
  2. '10em';
  3. document.body.appendChild(measure);
  4. var size= measure.offsetHeight/10;
  5. document.body.removeChild(measure);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.