diff --git a/index.html b/index.html
index a0055a4d66df99622dd4c0e892dc3435be539804..92f5628b3bd5b4e2be428993c75014a26345a904 100644
--- a/index.html
+++ b/index.html
@@ -80,9 +80,9 @@ function check_cuberoot(e) {
 }
 
 window.onload = function() {
-  if (screen.size <= 480) {
+  if (screen.width <= 480) {
     document.body.style.fontSize = "8vw";
-  } else if (screen.size <= 1024) {
+  } else if (screen.width <= 1024) {
     document.body.style.fontSize = "6vw";
   }
 }