dimanche 12 mars 2023

How to prevent title from moving when you start scrolling?

This is my current code for the given title:

`#navbar__title {
  background-color: white;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  font-size: 2rem;
  position: fixed;
  padding-left: 120px;
  padding-top: 15px;
}`

-for some reason when I scroll down, this is the only thing that doesn't want to stay on the place, it is flexible to the width as wanted but somehow, it just doesn't want to stay, I tried position: fixed and it didn't work. How do I prevent this from happening and what should I do to prevent this in the future on other elements?

Aucun commentaire:

Enregistrer un commentaire