Html div width 100% not functioning

前端 未结 5 655
鱼传尺愫
鱼传尺愫 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 05:18

    Working FIDDLE Demo

    You must set the width of your head-contents as the min-width of your header:

    #header {
        min-height:156px;  
        display: block;
        width:100%;
        background-image:url('http://www.webdesignideas.org/images/bellevueBg.gif');
    
        min-width: 974px; /* this is width of head-contents */
    }
    

提交回复
热议问题