Positioning a “wrapper” div underneath a fixed navigation bar?

前端 未结 2 860
一个人的身影
一个人的身影 2020-12-16 16:51

I\'ve started work on a brand new site and i\'ve been playing around with designs for a while, however one problem I seem to be having is regarding positioning a navigation

2条回答
  •  我在风中等你
    2020-12-16 17:49

    set top:0 on your navbar and add 30px margin-top on your wrapper div

    #navBar {
        background: RGB(0, 0, 0);
        height: 30px;
        position: fixed;
        width: 100%;
        top:0
    }
    #wrapper {
        margin: 30px auto 0;
        width: 980px;
    }
    

    http://jsfiddle.net/duncan/NkRxQ/

提交回复
热议问题