fixed position header overlapping

前端 未结 1 493
孤街浪徒
孤街浪徒 2021-01-21 22:07

Okay so I kind of have two problems. One is whenever I try to do position:fixed; on the .header it adds space to the bottom of the header and it makes the .main-content go behin

相关标签:
1条回答
  • 2021-01-21 23:04

    Now just add to this css define your .header position :fixed and define your body padding-top:65px;

     .header{
            position: fixed;
            left:0;
            right:0;
            top:0;
        }
        html body {
         padding-top: 65px;
        }
    
    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题