ilhamdev commited on
Commit
506d87b
1 Parent(s): f54a441

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -2
index.html CHANGED
@@ -465,17 +465,17 @@ window.onscroll = function() {scrollFunction()};
465
  function scrollFunction() {
466
  if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
467
  document.querySelector("header").style.padding = "10px 0"; // Menyusut menjadi setengah
468
- document.querySelector("header").style.overflow = "hidden"; // Mencegah h1 meluap
469
  document.querySelector("header h1").style.fontSize = "1em"; // Menyusut lebih lanjut
470
  document.querySelector("header h1").style.textAlign = "left"; // Teks berpindah ke kiri
471
  } else {
472
  document.querySelector("header").style.padding = "40px 0";
 
473
  document.querySelector("header h1").style.fontSize = "2.5em";
474
  document.querySelector("header h1").style.textAlign = "center";
475
  }
476
  }
477
 
478
-
479
 
480
  </script>
481
  </body>
 
465
  function scrollFunction() {
466
  if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
467
  document.querySelector("header").style.padding = "10px 0"; // Menyusut menjadi setengah
468
+ document.querySelector("header").style.minHeight = "50px"; // Menetapkan tinggi minimum
469
  document.querySelector("header h1").style.fontSize = "1em"; // Menyusut lebih lanjut
470
  document.querySelector("header h1").style.textAlign = "left"; // Teks berpindah ke kiri
471
  } else {
472
  document.querySelector("header").style.padding = "40px 0";
473
+ document.querySelector("header").style.minHeight = "0"; // Menghapus tinggi minimum
474
  document.querySelector("header h1").style.fontSize = "2.5em";
475
  document.querySelector("header h1").style.textAlign = "center";
476
  }
477
  }
478
 
 
479
 
480
  </script>
481
  </body>