Html div width 100% not functioning

前端 未结 5 657
鱼传尺愫
鱼传尺愫 2021-01-12 04:29

There are some problems with my HTML, so I am posting the code.

The first tag is a div with id=\"header\". I have given it 100% width and g

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-12 04:56

    I have found the solution:

    #header {
      height: 156px;
      min-width: 990px;
      background-image: url('http://www.webdesignideas.org/images/bellevueBg.gif');
      display: block;
    }
    
    #head-contents {
      width: 974px;
      margin: 0 auto;
      height: 156px;
    }
    

    It's all a matter of min-width in the #header. I checked out facebook's login page and figured it out.

提交回复
热议问题