0

My css:

*{
            margin: 0;
            padding: 0;
        }
        body{
            height: 2000px;
        }
        nav{
            width: 80vw;
            height: 10vw;
            background-color: black;
            border: 2px red solid;
            position: sticky;
            top: 0;
        }
        
        li{
            color: white;
            padding: 2vh;
            display: inline-block;
            font-size: 5vw;
        }
        .nothing{
            height: 100px;
            width: 100px;
            border: 2px brown solid;
            
        }

My navbar isnt sticking to the top even though there is no overflow element anywhere (which causes problems in this case i think) and top: 0 is also mentioned. Why is this?

Ame
  • 33
  • 4

0 Answers0